mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2024-11-26 03:58:49 +00:00
small improvements
This commit is contained in:
parent
88b348376f
commit
31d29712be
@ -1,3 +1,4 @@
|
|||||||
|
import dev.inmo.micro_utils.coroutines.runCatchingSafely
|
||||||
import dev.inmo.tgbotapi.bot.ktor.telegramBot
|
import dev.inmo.tgbotapi.bot.ktor.telegramBot
|
||||||
import dev.inmo.tgbotapi.extensions.api.bot.setMyCommands
|
import dev.inmo.tgbotapi.extensions.api.bot.setMyCommands
|
||||||
import dev.inmo.tgbotapi.extensions.api.chat.get.getChat
|
import dev.inmo.tgbotapi.extensions.api.chat.get.getChat
|
||||||
@ -111,7 +112,7 @@ suspend fun main(args: Array<String>) {
|
|||||||
|
|
||||||
bot.buildBehaviourWithLongPolling(
|
bot.buildBehaviourWithLongPolling(
|
||||||
defaultExceptionsHandler = {
|
defaultExceptionsHandler = {
|
||||||
println(it)
|
it.printStackTrace()
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
onCommand("simple", initialFilter = { it.chat is PublicChat && it.fromUserMessageOrNull() ?.user ?.id == allowedAdmin }) {
|
onCommand("simple", initialFilter = { it.chat is PublicChat && it.fromUserMessageOrNull() ?.user ?.id == allowedAdmin }) {
|
||||||
|
Loading…
Reference in New Issue
Block a user