1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

new setMyCommands extension added

This commit is contained in:
InsanusMokrassar 2020-06-02 19:54:13 +06:00
parent b477e8d585
commit ca9051920d
2 changed files with 5 additions and 0 deletions

View File

@ -65,6 +65,7 @@
* All `RequestsExecutor#executeAsync` and `RequestsExecutor#executeUnsafe` * All `RequestsExecutor#executeAsync` and `RequestsExecutor#executeUnsafe`
* `TelegramBotAPI-extensions-api`: * `TelegramBotAPI-extensions-api`:
* A lot of `RequesstExecutor#getChat` extensions was added for more explicit types showing * A lot of `RequesstExecutor#getChat` extensions was added for more explicit types showing
* New `RequesstExecutor#setMyCommands` extension was added
* `TelegramBotAPI-extensions-utils`: * `TelegramBotAPI-extensions-utils`:
* `safely` function was introduced. It is in `PreviewFeature` state currently * `safely` function was introduced. It is in `PreviewFeature` state currently
* `makeLinkToMessage` extensions has been added * `makeLinkToMessage` extensions has been added

View File

@ -7,3 +7,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.BotCommand
suspend fun RequestsExecutor.setMyCommands( suspend fun RequestsExecutor.setMyCommands(
commands: List<BotCommand> commands: List<BotCommand>
) = execute(SetMyCommands(commands)) ) = execute(SetMyCommands(commands))
suspend fun RequestsExecutor.setMyCommands(
vararg commands: BotCommand
) = setMyCommands(commands.toList())