Simplifying BotBuilder BotCommands
- Simplifying BotBuilder BotCommands - updating test project
This commit is contained in:
@@ -12,7 +12,7 @@ namespace TelegramBotBase.Commands
|
||||
/// </summary>
|
||||
/// <param name="cmds"></param>
|
||||
/// <param name="description"></param>
|
||||
public static void AddStartCommand(this List<BotCommand> cmds, String description)
|
||||
public static void Start(this List<BotCommand> cmds, String description)
|
||||
{
|
||||
cmds.Add(new BotCommand() { Command = "start", Description = description });
|
||||
}
|
||||
@@ -22,7 +22,7 @@ namespace TelegramBotBase.Commands
|
||||
/// </summary>
|
||||
/// <param name="cmds"></param>
|
||||
/// <param name="description"></param>
|
||||
public static void AddHelpCommand(this List<BotCommand> cmds, String description)
|
||||
public static void Help(this List<BotCommand> cmds, String description)
|
||||
{
|
||||
cmds.Add(new BotCommand() { Command = "help", Description = description });
|
||||
}
|
||||
@@ -32,9 +32,20 @@ namespace TelegramBotBase.Commands
|
||||
/// </summary>
|
||||
/// <param name="cmds"></param>
|
||||
/// <param name="description"></param>
|
||||
public static void AddSettingsCommand(this List<BotCommand> cmds, String description)
|
||||
public static void Settings(this List<BotCommand> cmds, String description)
|
||||
{
|
||||
cmds.Add(new BotCommand() { Command = "settings", Description = description });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding the command with a description.
|
||||
/// </summary>
|
||||
/// <param name="cmds"></param>
|
||||
/// <param name="command"></param>
|
||||
/// <param name="description"></param>
|
||||
public static void Add(this List<BotCommand> cmds, String command, String description)
|
||||
{
|
||||
cmds.Add(new BotCommand() { Command = command, Description = description });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user