mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-04 07:39:39 +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 {
|
val command = it.botCommandTextSourceOrNull() ?.takeIf {
|
||||||
commandRegex.matches(it.command)
|
commandRegex.matches(it.command)
|
||||||
} ?: return@forEach
|
} ?: return@forEach
|
||||||
|
if (command.username == null) {
|
||||||
|
return@lambda true
|
||||||
|
}
|
||||||
val botInfo = botInfo()
|
val botInfo = botInfo()
|
||||||
if (botInfo == null || command.username == botInfo.username) {
|
if (botInfo == null || command.username == botInfo.username) {
|
||||||
return@lambda true
|
return@lambda true
|
||||||
|
Reference in New Issue
Block a user