}</span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="../dev.inmo.tgbotapi.bot/index.html#-1167693203%2FClasslikes%2F789214110">TelegramBot</a></div><pclass="paragraph">Creates <ahref="-simple-multi-server-requests-executor/index.html">SimpleMultiServerRequestsExecutor</a></p><h4class="">Parameters</h4><divclass="table"><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span><span>bots</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">Bots which will be used to <ahref="../dev.inmo.tgbotapi.requests.abstracts/-request/index.html">SimpleMultiServerRequestsExecutor.execute</a>s</p></div></div></div></div><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span>bot</span><wbr><span><span>Selector</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">It is strategy by which the bot is selected for the execution. This lambda will receive <strong>-1</strong> when request execution just started and this call is first in context of one <ahref="-simple-multi-server-requests-executor/execute.html">SimpleMultiServerRequestsExecutor.execute</a>. By default, will select next <ahref="../dev.inmo.tgbotapi.bot/index.html#-1167693203%2FClasslikes%2F789214110">TelegramBot</a> when called (or first when current index is last or -1)</p></div></div></div></div><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span>on</span><wbr><span><span>Close</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">This method will be called inside of <ahref="-simple-multi-server-requests-executor/close.html">SimpleMultiServerRequestsExecutor.close</a> method. By default, will close all <ahref="telegram-bot.html">bots</a></p></div></div></div></div></div><hr><divclass="symbol monospace"><divclass="block"><divclass="block"><spanclass="token annotation builtin">@</span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-name/index.html"><spanclass="token annotation builtin">JvmName</span></a><spanclass="token punctuation">(</span><span>name<spanclass="token operator"> = </span><spanclass="breakable-word"><spanclass="token string">"telegramBotByApiUrlsKeepers"</span></span></span><wbr><spanclass="token punctuation">)</span></div></div><spanclass="token keyword">inline </span><spanclass="token keyword">fun </span><ahref="telegram-bot.html"><spanclass="token function">telegramBot</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">keepers<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html">Iterable</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="../dev.inmo.tgbotapi.utils/-telegram-a-p-i-urls-keeper/index.html">TelegramAPIUrlsKeeper</a><spanclass="token operator">></span><spanclass="token punctuation">, </span></span><spanclass="parameter "><spanclass="token keyword">crossinline </span>builder<spanclass="token operator">: </span><spanclass="token keyword"></span><ahref="../dev.inmo.tgbotapi.bot.ktor/-ktor-requests-executor-builder/index.html">KtorRequestsExecutorBuilder</a><spanclass="token punctuation">.</span><spanclass="token punctuation">(</span><spanclass="token keyword"></span><ahref="../dev.inmo.tgbotapi.utils/-telegram-a-p-i-urls-keeper/index.html">TelegramAPIUrlsKeeper</a><spanclass="token punctuation">)</span><spanclass="token operator"> -
getOrElse(i + 1) { first() }
}<spanclass="token punctuation">, </span></span><spanclass="parameter "><spanclass="token keyword">noinline </span>onClose<spanclass="token operator">: </span><spanclass="token punctuation">(</span><spanclass="token keyword"></span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="../dev.inmo.tgbotapi.bot/index.html#-1167693203%2FClasslikes%2F789214110">TelegramBot</a><spanclass="token operator">></span><spanclass="token punctuation">)</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>null</span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="../dev.inmo.tgbotapi.bot/index.html#-1167693203%2FClasslikes%2F789214110">TelegramBot</a></div><h4class="">Parameters</h4><divclass="table"><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span><span>keepers</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">Will be used to create result <ahref="../../tgbotapi.core/dev.inmo.tgbotapi.bot.multiserver/-simple-multi-server-requests-executor/bots.html">SimpleMultiServerRequestsExecutor.bots</a></p></div></div></div></div><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span><span>builder</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">Will be called with each item from <ahref="telegram-bot.html">keepers</a> in process of bots creation</p></div></div></div></div><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span>bot</span><wbr><span><span>Selector</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">It is strategy by which the bot is selected for the execution. This lambda will receive <strong>-1</strong> when request execution just started and this call is first in context of one <ahref="-simple-multi-server-requests-executor/execute.html">SimpleMultiServerRequestsExecutor.execute</a>. By default, will select next <ahref="../dev.inmo.tgbotapi.bot/index.html#-1167693203%2FClasslikes%2F789214110">TelegramBot</a> when called (or first when current index is last or -1)</p></div></div></div></div><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span>on</span><wbr><span><span>Close</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">This method will be called inside of <ahref="-simple-multi-server-requests-executor/close.html">SimpleMultiServerRequestsExecutor.close</a> method. By default, will close all <ahref="../../tgbotapi.core/dev.inmo.tgbotapi.bot.multiserver/-simple-multi-server-requests-executor/bots.html">SimpleMultiServerRequestsExecutor.bots</a></p></div></div></div></div></div><hr><divclass="symbol monospace"><divclass="block"><divclass="block"><spanclass="token annotation builtin">@</span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-name/index.html"><spanclass="token annotation builtin">JvmName</span></a><spanclass="token punctuation">(</span><span>name<spanclass="token operator"> = </span><spanclass="breakable-word"><spanclass="to
getOrElse(i + 1) { first() }
}<spanclass="token punctuation">, </span></span><spanclass="parameter "><spanclass="token keyword">noinline </span>onClose<spanclass="token operator">: </span><spanclass="token punctuation">(</span><spanclass="token keyword"></span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="../dev.inmo.tgbotapi.bot/index.html#-1167693203%2FClasslikes%2F789214110">TelegramBot</a><spanclass="token operator">></span><spanclass="token punctuation">)</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>null</span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="../dev.inmo.tgbotapi.bot/index.html#-1167693203%2FClasslikes%2F789214110">TelegramBot</a></div><h4class="">Parameters</h4><divclass="table"><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span><span>tokens</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">Will be used to create result <ahref="../../tgbotapi.core/dev.inmo.tgbotapi.bot.multiserver/-simple-multi-server-requests-executor/bots.html">SimpleMultiServerRequestsExecutor.bots</a></p></div></div></div></div><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span><span>builder</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">Will be called with each item from <ahref="telegram-bot.html">tokens</a> in process of bots creation</p></div></div></div></div><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span>bot</span><wbr><span><span>Selector</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">It is strategy by which the bot is selected for the execution. This lambda will receive <strong>-1</strong> when request execution just started and this call is first in context of one <ahref="-simple-multi-server-requests-executor/execute.html">SimpleMultiServerRequestsExecutor.execute</a>. By default, will select next <ahref="../dev.inmo.tgbotapi.bot/index.html#-1167693203%2FClasslikes%2F789214110">TelegramBot</a> when called (or first when current index is last or -1)</p></div></div></div></div><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span>on</span><wbr><span><span>Close</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">This method will be called inside of <ahref="-simple-multi-server-requests-executor/close.html">SimpleMultiServerRequestsExecutor.close</a> method. By default, will close all <ahref="../../tgbotapi.core/dev.inmo.tgbotapi.bot.multiserver/-simple-multi-server-requests-executor/bots.html">SimpleMultiServerRequestsExecutor.bots</a></p></div></div></div></div></div><hr><divclass="symbol monospace"><divclass="block"><divclass="block"><spanclass="token annotation builtin">@</span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-name/index.html"><spanclass="token annotation builtin">JvmName</span></a><spanclass="token punctuation">(</span><span>name<spanclass="token operator"> = </span><spanclass="breakable-word"><spanclass="toke
getOrElse(i + 1) { first() }
}<spanclass="token punctuation">, </span></span><spanclass="parameter "><spanclass="token keyword">noinline </span>onClose<spanclass="token operator">: </span><spanclass="token punctuation">(</span><spanclass="token keyword"></span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="../dev.inmo.tgbotapi.bot/index.html#-1167693203%2FClasslikes%2F789214110">TelegramBot</a><spanclass="token operator">></span><spanclass="token punctuation">)</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>null</span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="../dev.inmo.tgbotapi.bot/index.html#-1167693203%2FClasslikes%2F789214110">TelegramBot</a></div><h4class="">Parameters</h4><divclass="table"><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span><span>tokens</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph"><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/index.html">Pair</a>s with first parameter as a token and second parameter api url. Will be used to create result <ahref="../../tgbotapi.core/dev.inmo.tgbotapi.bot.multiserver/-simple-multi-server-requests-executor/bots.html">SimpleMultiServerRequestsExecutor.bots</a></p></div></div></div></div><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span><span>builder</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">Will be called with each item from <ahref="telegram-bot.html">tokens</a> in process of bots creation</p></div></div></div></div><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span>bot</span><wbr><span><span>Selector</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">It is strategy by which the bot is selected for the execution. This lambda will receive <strong>-1</strong> when request execution just started and this call is first in context of one <ahref="-simple-multi-server-requests-executor/execute.html">SimpleMultiServerRequestsExecutor.execute</a>. By default, will select next <ahref="../dev.inmo.tgbotapi.bot/index.html#-1167693203%2FClasslikes%2F789214110">TelegramBot</a> when called (or first when current index is last or -1)</p></div></div></div></div><divclass="table-row"data-filterable-current=":tgbotapi.core:dokkaHtmlPartial/commonMain"data-filterable-set=":tgbotapi.core:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span>on</span><wbr><span><span>Close</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">This method will be called inside of <ahref="-simple-multi-server-requests-executor/close.html">SimpleMultiServerRequestsExecutor.close</a> method. By default, will close all <ahref="../../tgbotapi.core/dev.inmo.tgbotapi.bot.multiserver/-simple-multi-server-requests-executor/bots.html">SimpleMultiServerRequestsExecutor.bots</a></p></div></div></div></div></div></div></div>