diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitCommandsMessages.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitCommandsMessages.kt index 92efba6529..df34cfab1f 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitCommandsMessages.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitCommandsMessages.kt @@ -40,7 +40,7 @@ suspend fun BehaviourContext.waitCommandMessage( ) = waitCommandMessage(Regex(command), initRequest, errorFactory) fun Flow>.requireCommandAtStart() = filter { - (it.content.textSources.firstOrNull() as? BotCommandTextSource) != null + it.content.textSources.firstOrNull() is BotCommandTextSource } /**