From 2c567419ece60839850b59df96da048e5e46d021 Mon Sep 17 00:00:00 2001 From: FlorianDahn Date: Sun, 15 May 2022 23:17:01 +0200 Subject: [PATCH] Update MessageClient.cs - increasing parameters for Get/SetCommand methods - adding DeleteBotCommands methods --- TelegramBotBase/Base/MessageClient.cs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/TelegramBotBase/Base/MessageClient.cs b/TelegramBotBase/Base/MessageClient.cs index e252f35..85195f9 100644 --- a/TelegramBotBase/Base/MessageClient.cs +++ b/TelegramBotBase/Base/MessageClient.cs @@ -159,27 +159,35 @@ namespace TelegramBotBase.Base /// This will return the current list of bot commands. /// /// - public async Task GetBotCommands() + public async Task GetBotCommands(BotCommandScope scope = null, String languageCode = null) { - return await this.TelegramClient.GetMyCommandsAsync(); + return await this.TelegramClient.GetMyCommandsAsync(scope, languageCode); } + /// /// This will set your bot commands to the given list. /// /// /// - public async Task SetBotCommands(List botcommands) + public async Task SetBotCommands(List botcommands, BotCommandScope scope = null, String languageCode = null) { - await this.TelegramClient.SetMyCommandsAsync(botcommands); + await this.TelegramClient.SetMyCommandsAsync(botcommands, scope, languageCode); } - + /// + /// This will delete the current list of bot commands. + /// + /// + public async Task DeleteBotCommands(BotCommandScope scope = null, String languageCode = null) + { + await this.TelegramClient.DeleteMyCommandsAsync(scope, languageCode); + } #region "Events" - + public event Async.AsyncEventHandler MessageLoop {