Replacing Configure method in BBB with CustomCommands

This commit is contained in:
FlorianDahn 2021-11-22 22:07:55 +01:00
parent b001d5e9c4
commit d0edf8531c
2 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ namespace TelegramBotBase.Builder
return this; return this;
} }
public ISessionSerializationStage Configure(Action<List<BotCommand>> action) public ISessionSerializationStage CustomCommands(Action<List<BotCommand>> action)
{ {
action?.Invoke(_botcommands); action?.Invoke(_botcommands);
return this; return this;

View File

@ -23,7 +23,7 @@ namespace TelegramBotBaseTest
.WithAPIKey(APIKey) .WithAPIKey(APIKey)
.WithStartForm<Start>() .WithStartForm<Start>()
.NoProxy() .NoProxy()
.Configure(a => .CustomCommands(a =>
{ {
a.AddStartCommand("Starts the bot"); a.AddStartCommand("Starts the bot");
a.AddHelpCommand("Should show you some help"); a.AddHelpCommand("Should show you some help");