mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2024-11-22 00:03:54 +00:00
improvements
This commit is contained in:
parent
c88f84011f
commit
7d786f0e06
@ -2,6 +2,7 @@ import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptions
|
|||||||
import dev.inmo.tgbotapi.extensions.api.EditLiveLocationInfo
|
import dev.inmo.tgbotapi.extensions.api.EditLiveLocationInfo
|
||||||
import dev.inmo.tgbotapi.extensions.api.chat.get.getChat
|
import dev.inmo.tgbotapi.extensions.api.chat.get.getChat
|
||||||
import dev.inmo.tgbotapi.extensions.api.edit.edit
|
import dev.inmo.tgbotapi.extensions.api.edit.edit
|
||||||
|
import dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation
|
||||||
import dev.inmo.tgbotapi.extensions.api.handleLiveLocation
|
import dev.inmo.tgbotapi.extensions.api.handleLiveLocation
|
||||||
import dev.inmo.tgbotapi.extensions.api.send.*
|
import dev.inmo.tgbotapi.extensions.api.send.*
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitMessageDataCallbackQuery
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitMessageDataCallbackQuery
|
||||||
@ -75,7 +76,7 @@ suspend fun main(vararg args: String) {
|
|||||||
|
|
||||||
sendingJob.cancel() // ends live location
|
sendingJob.cancel() // ends live location
|
||||||
currentMessageState.value ?.let {
|
currentMessageState.value ?.let {
|
||||||
edit(it, replyMarkup = null) // removing reply keyboard
|
stopLiveLocation(it, replyMarkup = null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
allUpdatesFlow.subscribeSafelyWithoutExceptions(this) { println(it) }
|
allUpdatesFlow.subscribeSafelyWithoutExceptions(this) { println(it) }
|
||||||
|
@ -71,7 +71,7 @@ fun main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
appendText("Exit button")
|
appendText("Answer in chat button")
|
||||||
} ?: window.alert("Unable to load body")
|
} ?: window.alert("Unable to load body")
|
||||||
|
|
||||||
document.body ?.appendElement("p", {})
|
document.body ?.appendElement("p", {})
|
||||||
|
Loading…
Reference in New Issue
Block a user