<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":docs:dokkaHtml/commonMain"><divclass="symbol monospace"><spanclass="token keyword">suspend </span><spanclass="token keyword">fun </span><ahref="../dev.inmo.tgbotapi.extensions.behaviour_builder/-behaviour-context/index.html">BehaviourContext</a><spanclass="token punctuation">.</span><ahref="wait-command-message.html"><spanclass="token function">waitCommandMessage</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">commandRegex<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html">Regex</a><spanclass="token punctuation">, </span></span><spanclass="parameter ">initRequest<spanclass="token operator">: </span><ahref="../dev.inmo.tgbotapi.requests.abstracts/-request/index.html">Request</a><spanclass="token operator"><</span><spanclass="token operator">*</span><spanclass="token operator">></span><spanclass="token operator">?</span><spanclass="token operator"> = </span>null<spanclass="token punctuation">, </span></span><spanclass="parameter ">errorFactory<spanclass="token operator">: </span><ahref="index.html#278660993%2FClasslikes%2F-1982836883">NullableRequestBuilder</a><spanclass="token operator"><</span><spanclass="token operator">*</span><spanclass="token operator">></span><spanclass="token operator"> = </span>{ null }</span></span><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/-common-message/index.html">CommonMessage</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></div><pclass="paragraph">Will filter all the messages and include required commands with <ahref="wait-command-message.html">commandRegex</a>.</p><ul><li><pclass="paragraph">In case you wish to get only the commands at the start of message, use <ahref="require-command-at-start.html">requireCommandAtStart</a></p></li><li><pclass="paragraph">In case you wish to exclude messages with more than one command, you may use <ahref="require-single-command.html">requireSingleCommand</a></p></li><li><pclass="paragraph">In case you wish to exclude messages with commands params, you may use <ahref="require-commands-without-params.html">requireCommandsWithoutParams</a></p></li></ul><hr><divclass="symbol monospace"><spanclass="token keyword">suspend </span><spanclass="token keyword">fun </span><ahref="../dev.inmo.tgbotapi.extensions.behaviour_builder/-behaviour-context/index.html">BehaviourContext</a><spanclass="token punctuation">.</span><ahref="wait-command-message.html"><spanclass="token function">waitCommandMessage</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">command<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a><spanclass="token punctuation">, </span></span><spanclass="parameter ">initRequest<spanclass="token operator">: </span><ahref="../dev.inmo.tgbotapi.requests.abstracts/-request/index.html">Request</a><spanclass="token operator"><</span><spanclass="token operator">*</span><spanclass="token operator">></span><spanclass="token operator">?</span><spanclass="token operator"> = </span>null<spanclass="token punctuation">, </span></span><spanclass="parameter ">errorFactory<spanclass="token operator">: </span><ahref="index.html#278660993%2FClasslikes%2F-1982836883">NullableRequestBuilder</a><spanclass="token operator"><</span><spanclass="tokenoper