mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-02 22:59:48 +00:00
small fix in filter of commands
This commit is contained in:
@@ -50,6 +50,9 @@ internal fun <BC : BehaviourContext> BC.commandUncounted(
|
||||
val command = it.botCommandTextSourceOrNull() ?.takeIf {
|
||||
commandRegex.matches(it.command)
|
||||
} ?: return@forEach
|
||||
if (command.username == null) {
|
||||
return@lambda true
|
||||
}
|
||||
val botInfo = botInfo()
|
||||
if (botInfo == null || command.username == botInfo.username) {
|
||||
return@lambda true
|
||||
|
Reference in New Issue
Block a user