diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e4212b450..242a45f9c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ * All `RequestsExecutor#executeAsync` and `RequestsExecutor#executeUnsafe` * `TelegramBotAPI-extensions-api`: * A lot of `RequesstExecutor#getChat` extensions was added for more explicit types showing + * New `RequesstExecutor#setMyCommands` extension was added * `TelegramBotAPI-extensions-utils`: * `safely` function was introduced. It is in `PreviewFeature` state currently * `makeLinkToMessage` extensions has been added diff --git a/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/bot/SetMyCommands.kt b/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/bot/SetMyCommands.kt index 5347510a5f..860f0d8a3b 100644 --- a/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/bot/SetMyCommands.kt +++ b/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/bot/SetMyCommands.kt @@ -7,3 +7,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.BotCommand suspend fun RequestsExecutor.setMyCommands( commands: List ) = execute(SetMyCommands(commands)) + +suspend fun RequestsExecutor.setMyCommands( + vararg commands: BotCommand +) = setMyCommands(commands.toList())