<divclass="content sourceset-depenent-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.bot/index.html#-1167693203%2FClasslikes%2F-1982836883">TelegramBot</a><spanclass="token punctuation">.</span><ahref="build-behaviour-with-long-polling.html"><spanclass="token function">buildBehaviourWithLongPolling</span></a><spanclass="token punctuation">(</span>scope<spanclass="token operator">: </span><spandata-unresolved-link="kotlinx.coroutines/CoroutineScope///PointingToDeclaration/">CoroutineScope</span><spanclass="token operator"> = </span>defaultCoroutineScopeProvider()<spanclass="token punctuation">, </span>defaultExceptionsHandler<spanclass="token operator">: </span><spandata-unresolved-link="dev.inmo.micro_utils.coroutines/ExceptionHandler///PointingToDeclaration/">ExceptionHandler</span><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a><spanclass="token operator">></span><spanclass="token operator">?</span><spanclass="token operator"> = </span>null<spanclass="token punctuation">, </span>block<spanclass="token operator">: </span><ahref="index.html#1125173050%2FClasslikes%2F-1982836883">BehaviourContextReceiver</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a><spanclass="token operator">></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><spandata-unresolved-link="kotlinx.coroutines/Job///PointingToDeclaration/">Job</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">Use this method to build bot behaviour and run it via long polling. In case you wish to get <ahref="../dev.inmo.tgbotapi.updateshandlers/-flows-updates-filter/index.html">FlowsUpdatesFilter</a> for additional manipulations, you must provide external <ahref="../dev.inmo.tgbotapi.updateshandlers/-flows-updates-filter/index.html">FlowsUpdatesFilter</a> in other <ahref="build-behaviour.html">buildBehaviour</a> function.</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"><divclass=""><spanclass="inline-flex"><div><ahref="build-behaviour.html"><span>build</span><wbr></wbr><span><span>Behaviour</span></span></a></div></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"><div><ahref="-behaviour-context/index.html"><span>dev.</span><wbr></wbr><span>inmo.</span><wbr></wbr><span>tgbotapi.</span><wbr></wbr><span>extensions.</span><wbr></wbr><span>behaviour_builder.</span><wbr></wbr><span>Behaviour</span><wbr></wbr><span><span>Context</span></span></a></div></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"><div><ahref="../dev.inmo.tgbotapi.extensions.utils.updates.retrieving/start-getting-of-updates-by-long-polling.html"><span>start</span><wbr></wbr><span>Getting</span><wbr></wbr><span>Of</span><wbr></wbr><span>Updates</span><wbr></wbr><span>By</span><wbr></wbr><span>Long</span><wbr></wbr><span><span>