From fab3af48d61d7d2fa596e9a92684d6980df43188 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 25 Aug 2022 02:04:19 +0600 Subject: [PATCH] Update WaitCommandsMessages.kt --- .../behaviour_builder/expectations/WaitCommandsMessages.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } /**