check and a little update

This commit is contained in:
2023-02-27 22:38:05 +06:00
parent cb84fd0884
commit d8c90ef377
3 changed files with 17 additions and 4 deletions

View File

@@ -109,7 +109,11 @@ suspend fun main(args: Array<String>) {
}
}
bot.buildBehaviourWithLongPolling {
bot.buildBehaviourWithLongPolling(
defaultExceptionsHandler = {
println(it)
}
) {
onCommand("simple", initialFilter = { it.chat is PublicChat && it.fromUserMessageOrNull() ?.user ?.id == allowedAdmin }) {
val replyMessage = it.replyTo
val userInReply = replyMessage ?.fromUserMessageOrNull() ?.user ?.id ?: return@onCommand