<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":tgbotapi.utils:dokkaHtmlPartial/commonMain"><divclass="symbol monospace"><spanclass="token keyword"></span><spanclass="token keyword">fun </span><ahref="../../tgbotapi.core/dev.inmo.tgbotapi.types.message.abstracts/-common-message/index.html">CommonMessage</a><spanclass="token operator"><</span><spanclass="token operator">*</span><spanclass="token operator">></span><spanclass="token punctuation">.</span><ahref="has-commands.html"><spanclass="token function">hasCommands</span></a><spanclass="token punctuation">(</span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></div><pclass="paragraph">A predicate to test whether a message contains any commands in its body. Use it as the <codeclass="lang-kotlin">initialFilter</code> parameter in behaviour builder triggers. E.g.</p><divclass="sample-container"><pre><codeclass="block lang-kotlin"theme="idea">onContentMessage(<br> initialFilter = CommonMessage<MessageContent>::hasCommands<br>) {<br> // the message contains at least one command here<br>}</code></pre><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><spanclass="kdoc-tag"><h4class="">Return</h4><pclass="paragraph">true if this <ahref="../../tgbotapi.core/dev.inmo.tgbotapi.types.message.abstracts/-common-message/index.html">CommonMessage</a> contains any commands. False otherwise.</p></span><h4class="">See also</h4><divclass="table"><divclass="table-row"data-filterable-current=":tgbotapi.utils:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.utils:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><ahref="has-no-commands.html"><span>has</span><wbr><span>No</span><wbr><span><span>Commands</span></span></a></div></span></div><div></div></div></div></div></div></div>