From a00aaacbfb832652b959cecc66d9109550fd17e5 Mon Sep 17 00:00:00 2001 From: FlorianDahn Date: Mon, 7 Jun 2021 01:31:41 +0200 Subject: [PATCH] Update ButtonGrid.cs - adding DeleteReplyMessage property for seperating now deleting the message from the user and the message (buttons) send by the control --- TelegramBotBase/Controls/Hybrid/ButtonGrid.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/TelegramBotBase/Controls/Hybrid/ButtonGrid.cs b/TelegramBotBase/Controls/Hybrid/ButtonGrid.cs index 7a1318b..fb116c7 100644 --- a/TelegramBotBase/Controls/Hybrid/ButtonGrid.cs +++ b/TelegramBotBase/Controls/Hybrid/ButtonGrid.cs @@ -47,6 +47,11 @@ namespace TelegramBotBase.Controls.Hybrid public bool DeletePreviousMessage { get; set; } = true; + /// + /// Removes the reply message from a user. + /// + public bool DeleteReplyMessage { get; set; } = true; + /// /// Parsemode of the message. /// @@ -197,7 +202,7 @@ namespace TelegramBotBase.Controls.Hybrid await OnButtonClicked(new ButtonClickedEventArgs(button, index)); //Remove button click message - if (this.DeletePreviousMessage) + if (this.DeleteReplyMessage) await Device.DeleteMessage(result.MessageId); result.Handled = true;