From e81e5f1854ec8bb6661aa6c89421719f19328493 Mon Sep 17 00:00:00 2001 From: FlorianDahn Date: Mon, 1 Mar 2021 22:53:03 +0100 Subject: [PATCH] Bot command extensions for default commands --- TelegramBotBase/Commands/Extensions.cs | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 TelegramBotBase/Commands/Extensions.cs diff --git a/TelegramBotBase/Commands/Extensions.cs b/TelegramBotBase/Commands/Extensions.cs new file mode 100644 index 0000000..47b415e --- /dev/null +++ b/TelegramBotBase/Commands/Extensions.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Telegram.Bot.Types; + +namespace TelegramBotBase.Commands +{ + public static class Extensions + { + /// + /// Adding the default /start command with a description. + /// + /// + /// + public static void AddStartCommand(this List cmds, String description) + { + cmds.Add(new BotCommand() { Command = "/start", Description = description }); + } + + /// + /// Adding the default /help command with a description. + /// + /// + /// + public static void AddHelpCommand(this List cmds, String description) + { + cmds.Add(new BotCommand() { Command = "/help", Description = description }); + } + + /// + /// Adding the default /settings command with a description. + /// + /// + /// + public static void AddSettingsCommand(this List cmds, String description) + { + cmds.Add(new BotCommand() { Command = "/settings", Description = description }); + } + } +}