filterExactCommands

fun <T> Flow<T>.filterExactCommands(commandRegex: <Error class: unknown class>): Flow<T>

Convert incoming dev.inmo.tgbotapi.types.message.abstracts.ContentMessage.content of messages with fullEntitiesList and check that incoming message contains ONLY ONE TextSource and that is BotCommandTextSource. Besides, it is checking that Regex.matches with incoming commandRegex

Return

The same message in case if it contains only BotCommandTextSource with BotCommandTextSource.command

See also