<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":tgbotapi.behaviour_builder:dokkaHtmlPartial/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><spanclass="parameters "><spanclass="parameter ">message<spanclass="token operator">: </span><ahref="../../tgbotapi.core/dev.inmo.tgbotapi.types.message.abstracts/-content-message/index.html">ContentMessage</a><spanclass="token operator"><</span><ahref="../../tgbotapi.core/dev.inmo.tgbotapi.types.message.content/-live-location-content/index.html">LiveLocationContent</a><spanclass="token operator">></span><spanclass="token punctuation">, </span></span><spanclass="parameter ">onLocation<spanclass="token operator">: </span><ahref="../dev.inmo.tgbotapi.extensions.behaviour_builder/-behaviour-context-and-type-receiver/index.html">BehaviourContextAndTypeReceiver</a><spanclass="token operator"><</span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a><spanclass="token punctuation">, </span><ahref="../../tgbotapi.core/dev.inmo.tgbotapi.types.location/-location/index.html">Location</a><spanclass="token operator">></span></span></span><spanclass="token punctuation">)</span></div><pclass="paragraph">Use this extension when you want to follow <ahref="../../tgbotapi.core/dev.inmo.tgbotapi.types.location/-live-location/index.html">LiveLocation</a> until it will became <ahref="../../tgbotapi.core/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>