mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2024-11-22 00:03:54 +00:00
several small improvements
This commit is contained in:
parent
29e1552618
commit
e722055871
@ -38,12 +38,11 @@ suspend fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
strictlyOn<ExpectContentOrStopState> {
|
strictlyOn<ExpectContentOrStopState> {
|
||||||
sendMessage(
|
send(
|
||||||
it.context,
|
it.context
|
||||||
buildEntities {
|
) {
|
||||||
+"Send me some content or " + botCommand("stop") + " if you want to stop sending"
|
+"Send me some content or " + botCommand("stop") + " if you want to stop sending"
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
val contentMessage = waitContentMessage().first()
|
val contentMessage = waitContentMessage().first()
|
||||||
val content = contentMessage.content
|
val content = contentMessage.content
|
||||||
@ -57,7 +56,7 @@ suspend fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
strictlyOn<StopState> {
|
strictlyOn<StopState> {
|
||||||
send(it.context, "You have stopped sending of content")
|
send(it.context) { +"You have stopped sending of content" }
|
||||||
|
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user