1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-03 07:09:23 +00:00

small fix in filter of commands

This commit is contained in:
2025-08-10 23:03:17 +06:00
parent 0726574852
commit 12ee862dad

View File

@@ -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