Updating BotBaseBuilder with more functionality

This commit is contained in:
FlorianDahn
2021-10-17 18:21:05 +02:00
parent c4a31e987b
commit d00c5e1799
5 changed files with 138 additions and 37 deletions
+11 -6
View File
@@ -23,14 +23,19 @@ namespace TelegramBotBaseTest
.WithAPIKey(APIKey)
.WithStartForm<Start>()
.NoProxy()
.Configure(a =>
{
a.AddStartCommand("Starts the bot");
a.AddHelpCommand("Should show you some help");
a.AddSettingsCommand("Should show you some settings");
a.Add(new BotCommand() { Command = "form1", Description = "Opens test form 1" });
a.Add(new BotCommand() { Command = "form2", Description = "Opens test form 2" });
a.Add(new BotCommand() { Command = "params", Description = "Returns all send parameters as a message." });
})
.NoSerialization()
.Build();
bb.BotCommands.AddStartCommand("Starts the bot");
bb.BotCommands.AddHelpCommand("Should show you some help");
bb.BotCommands.AddSettingsCommand("Should show you some settings");
bb.BotCommands.Add(new BotCommand() { Command = "form1", Description = "Opens test form 1" });
bb.BotCommands.Add(new BotCommand() { Command = "form2", Description = "Opens test form 2" });
bb.BotCommands.Add(new BotCommand() { Command = "params", Description = "Returns all send parameters as a message." });
bb.BotCommand += async (s, en) =>
{