1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-10-19 14:20:12 +00:00

one new telegramBot function

This commit is contained in:
2020-11-17 16:18:58 +06:00
parent 657e9aa770
commit 74c480b07e
2 changed files with 13 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.extensions.api
import dev.inmo.tgbotapi.bot.Ktor.KtorRequestsExecutorBuilder
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
import dev.inmo.tgbotapi.utils.telegramBotAPIDefaultUrl
@@ -71,11 +72,12 @@ inline fun telegramBot(
/**
* Allows to create bot using bot [token], [apiUrl] (for custom api servers) and already prepared [client]
*/
@Deprecated("Replaced in core", ReplaceWith("telegramBot", "dev.inmo.tgbotapi.bot.Ktor.telegramBot"))
@Suppress("NOTHING_TO_INLINE")
inline fun telegramBot(
token: String,
apiUrl: String = telegramBotAPIDefaultUrl
): TelegramBot = telegramBot(TelegramAPIUrlsKeeper(token, apiUrl))
): TelegramBot = dev.inmo.tgbotapi.bot.Ktor.telegramBot(token, apiUrl)
/**
* Allows to create bot using bot [token], [apiUrl] (for custom api servers) and already prepared [client]