Update WaitCommandsMessages.kt

This commit is contained in:
InsanusMokrassar 2022-08-25 02:04:19 +06:00 committed by GitHub
parent 8d7563b6e4
commit fab3af48d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ suspend fun BehaviourContext.waitCommandMessage(
) = waitCommandMessage(Regex(command), initRequest, errorFactory)
fun Flow<CommonMessage<TextContent>>.requireCommandAtStart() = filter {
(it.content.textSources.firstOrNull() as? BotCommandTextSource) != null
it.content.textSources.firstOrNull() is BotCommandTextSource
}
/**