<divclass="content sourceset-depenent-content"data-active=""data-togglable=":docs:dokkaHtml/commonMain"><divclass="symbol monospace"><spanclass="token keyword"></span><spanclass="token keyword">fun </span><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="filter-commands-inside-text-messages.html">T</a><spanclass="token operator"> : </span><ahref="../dev.inmo.tgbotapi.types.update.abstracts/-base-sent-message-update/index.html">BaseSentMessageUpdate</a><spanclass="token operator">></span><spandata-unresolved-link="kotlinx.coroutines.flow/Flow///PointingToDeclaration/">Flow</span><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="filter-commands-inside-text-messages.html">T</a><spanclass="token operator">></span><spanclass="token punctuation">.</span><ahref="filter-commands-inside-text-messages.html"><spanclass="token function">filterCommandsInsideTextMessages</span></a><spanclass="token punctuation">(</span>commandRegex<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html">Regex</a><spanclass="token punctuation">)</span><spanclass="token operator">: </span><spandata-unresolved-link="kotlinx.coroutines.flow/Flow///PointingToDeclaration/">Flow</span><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="../dev.inmo.tgbotapi.types.message.abstracts/-content-message/index.html">ContentMessage</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="../dev.inmo.tgbotapi.types.message.content/-text-content/index.html">TextContent</a><spanclass="token operator">></span><spanclass="token operator">></span><spanclass="top-right-position"><spanclass="copy-icon"></span><divclass="copy-popup-wrapper popup-to-left"><spanclass="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><pclass="paragraph">Convert incoming <ahref="../dev.inmo.tgbotapi.types.message.abstracts/-content-message/content.html">dev.inmo.tgbotapi.types.message.abstracts.ContentMessage.content</a> of messages with fullEntitiesList and check that incoming message contains <ahref="../dev.inmo.tgbotapi.types.MessageEntity.textsources/-bot-command-text-source/index.html">BotCommandTextSource</a>. Besides, it is checking that <ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/matches.html">BotCommandTextSource.command</a> with incoming <ahref="filter-commands-inside-text-messages.html">commandRegex</a></p><h4class="">Return</h4><pclass="paragraph">The same message in case if it contains somewhere in text <ahref="../dev.inmo.tgbotapi.types.MessageEntity.textsources/-bot-command-text-source/index.html">BotCommandTextSource</a> with <ahref="../dev.inmo.tgbotapi.types.MessageEntity.textsources/-bot-command-text-source/command.html">Regex.matches</a></p><h2class="">See also</h2><divdata-togglable="See also"><divclass="table"data-togglable="See also"><divclass="table-row"data-filterable-current=":docs:dokkaHtml/commonMain"data-filterable-set=":docs:dokkaHtml/commonMain"><divclass="main-subrow keyValue WithExtraAttributes"><div><divclass="title">fullEntitiesList<divdata-togglable="See also"></div></div></div></div></div><divclass="table-row"data-filterable-current=":docs:dokkaHtml/commonMain"data-filterable-set=":docs:dokkaHtml/commonMain"><divclass="main-subrow keyValue WithExtraAttributes"><divclass=""><spanclass="inline-flex"><ahref="as-content-messages-flow.html">asContentMessagesFlow</a></span></div><div><divclass="title"><divdata-togglable="See also"></div></div></div></div></div><divclass="table-row"data-filterable-current=":docs:dokkaHtml/commonMain"data-filterable-set=":docs:dokkaHtml/commonMain"><divclass="main-subrow keyValue WithExtraAttributes"><divclass=""><spanclass="inline-flex"><ahref="../dev.inmo.tgbotapi.extensions.utils/only-text-content-messages.html">onlyTextContentMessages</a></span></div><div><divclass="title"><divdata-togglable="See also"><