<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.extensions.behaviour_builder/-behaviour-context/index.html">BehaviourContext</a><spanclass="token punctuation">.</span><ahref="follow-location.html"><spanclass="token function">followLocation</span></a><spanclass="token punctuation">(</span>message<spanclass="token operator">: </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/-live-location-content/index.html">LiveLocationContent</a><spanclass="token operator">></span><spanclass="token punctuation">, </span>onLocation<spanclass="token operator">: </span><ahref="../dev.inmo.tgbotapi.extensions.behaviour_builder/index.html#-1477624743%2FClasslikes%2F-1982836883">BehaviourContextAndTypeReceiver</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 punctuation">, </span><spanclass="token keyword"></span><ahref="../dev.inmo.tgbotapi.types.location/-location/index.html">Location</a><spanclass="token operator">></span><spanclass="token punctuation">)</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 extension when you want to follow <ahref="../dev.inmo.tgbotapi.types.location/-live-location/index.html">LiveLocation</a> until it will became <ahref="../dev.inmo.tgbotapi.types.location/-static-location/index.html">StaticLocation</a>. This method is synchronous. You may use something like <spandata-unresolved-link="kotlinx.coroutines//launch/kotlinx.coroutines.CoroutineScope#kotlin.coroutines.CoroutineContext#kotlinx.coroutines.CoroutineStart#kotlin.coroutines.SuspendFunction1[kotlinx.coroutines.CoroutineScope,kotlin.Unit]/PointingToDeclaration/">kotlinx.coroutines.launch</span> or <spandata-unresolved-link="kotlinx.coroutines//async/kotlinx.coroutines.CoroutineScope#kotlin.coroutines.CoroutineContext#kotlinx.coroutines.CoroutineStart#kotlin.coroutines.SuspendFunction1[kotlinx.coroutines.CoroutineScope,TypeParam(bounds=[kotlin.Any?])]/PointingToDeclaration/">kotlinx.coroutines.async</span> to run it asynchronously</p></div></div>