From a5cc80a1ebdf6cddb62e3080ec03b32c274ec1d3 Mon Sep 17 00:00:00 2001 From: Kirill Romanov Date: Fri, 22 Oct 2021 21:34:04 +0300 Subject: [PATCH] fix getMyCommands overloads conflict when no arguments provided --- CHANGELOG.md | 2 ++ .../dev/inmo/tgbotapi/extensions/api/bot/GetMyCommands.kt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76aeccbb7c..9d5f378216 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 0.36.1 +* `API`: + * Fix `getMyCommands` overloads conflict when no arguments provided * `Utils`: * `buildEntities` DSL now have parameter `separator` to specify `TextSource` that will be inserted between other sources diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/bot/GetMyCommands.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/bot/GetMyCommands.kt index 59fb66828d..9fe8119ea6 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/bot/GetMyCommands.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/bot/GetMyCommands.kt @@ -13,5 +13,5 @@ suspend fun TelegramBot.getMyCommands( suspend fun TelegramBot.getMyCommands( scope: BotCommandScope = BotCommandScopeDefault, - languageCode: String? = null + languageCode: String? ) = getMyCommands(scope, languageCode ?.let(::IetfLanguageCode))