From a4d1dea47d559d21842a5820502272855d6b4d2f Mon Sep 17 00:00:00 2001 From: Sergey Gut Date: Wed, 16 Feb 2022 07:37:03 +0300 Subject: [PATCH] Disable notifications for /top call --- modules/Reputation/Handler/Reputation.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/Reputation/Handler/Reputation.cs b/modules/Reputation/Handler/Reputation.cs index 590076d..71c24d6 100644 --- a/modules/Reputation/Handler/Reputation.cs +++ b/modules/Reputation/Handler/Reputation.cs @@ -8,7 +8,9 @@ using Kruzya.TelegramBot.Core.Data; using Kruzya.TelegramBot.Core.Extensions; using Kruzya.TelegramBot.Core.Service; using Microsoft.Extensions.Logging; +using Telegram.Bot; using Telegram.Bot.Types; +using Telegram.Bot.Types.Enums; namespace West.TelegramBot.Reputation.Handler; @@ -141,7 +143,8 @@ public class Reputation : CommonHandler i++; } - await Bot.SendHtmlStringAsync(Chat, msg); + await Bot.SendTextMessageAsync(Chat, msg.ToString(), ParseMode.Html, + disableNotification: true); } private async Task GetUserReputation(User user)