Update BotBase.cs

fixing new command handling
This commit is contained in:
FlorianDahn 2020-04-11 19:42:24 +02:00
parent 25a0ff2e3e
commit a1b3b9246b

View File

@ -256,8 +256,8 @@ namespace TelegramBotBase
ds.LastAction = DateTime.Now;
ds.LastMessage = e.Message;
//Is this a systemcall ?
if (e.IsBotCommand && this.BotCommands.Count(a => a.Command == e.BotCommand) > 0)
//Is this a bot command ?
if (e.IsBotCommand && this.BotCommands.Count(a => "/" + a.Command == e.BotCommand) > 0)
{
var sce = new BotCommandEventArgs(e.BotCommand, e.BotCommandParameters, e.Message, ds.DeviceId, ds);
await OnBotCommand(sce);