From e3d1652a02328a79a3f5682ba92dc5e91858b1ef Mon Sep 17 00:00:00 2001 From: Florian Zevedei Date: Wed, 29 May 2024 21:35:09 +0200 Subject: [PATCH] Fixing on EditableMessage --- TelegramBotBase/Base/MessageResult.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/TelegramBotBase/Base/MessageResult.cs b/TelegramBotBase/Base/MessageResult.cs index c4eb955..0b86362 100644 --- a/TelegramBotBase/Base/MessageResult.cs +++ b/TelegramBotBase/Base/MessageResult.cs @@ -21,7 +21,7 @@ public class MessageResult : ResultBase { IsAction = UpdateData.CallbackQuery != null; - IsBotCommand = UpdateData.Message.Entities.Any(a => a.Type == MessageEntityType.BotCommand); + IsBotCommand = Message.Entities?.Any(a => a.Type == MessageEntityType.BotCommand) ?? false; if (!IsBotCommand) return; @@ -34,8 +34,6 @@ public class MessageResult : ResultBase { BotCommand = BotCommand.Substring(0, BotCommand.LastIndexOf('@')); } - - } public Update UpdateData { get; private set; }