Update BotBase.cs
fixing new command handling
This commit is contained in:
parent
25a0ff2e3e
commit
a1b3b9246b
@ -256,8 +256,8 @@ namespace TelegramBotBase
|
|||||||
ds.LastAction = DateTime.Now;
|
ds.LastAction = DateTime.Now;
|
||||||
ds.LastMessage = e.Message;
|
ds.LastMessage = e.Message;
|
||||||
|
|
||||||
//Is this a systemcall ?
|
//Is this a bot command ?
|
||||||
if (e.IsBotCommand && this.BotCommands.Count(a => a.Command == e.BotCommand) > 0)
|
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);
|
var sce = new BotCommandEventArgs(e.BotCommand, e.BotCommandParameters, e.Message, ds.DeviceId, ds);
|
||||||
await OnBotCommand(sce);
|
await OnBotCommand(sce);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user