1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-05 08:09:21 +00:00

update defaults in telegramBot factories

This commit is contained in:
2022-04-21 21:48:25 +06:00
parent 0a27d9bf28
commit 56d7853f68
2 changed files with 29 additions and 29 deletions

View File

@@ -13,7 +13,7 @@ import io.ktor.client.engine.*
*/
fun telegramBot(
urlsKeeper: TelegramAPIUrlsKeeper,
client: HttpClient
client: HttpClient = HttpClient()
): TelegramBot = telegramBot(urlsKeeper) {
this.client = client
}
@@ -66,7 +66,7 @@ inline fun telegramBot(
inline fun telegramBot(
token: String,
apiUrl: String = telegramBotAPIDefaultUrl,
client: HttpClient
client: HttpClient = HttpClient()
): TelegramBot = telegramBot(TelegramAPIUrlsKeeper(token, apiUrl), client)
@Suppress("NOTHING_TO_INLINE")