Fixes for multiple handlers

This commit is contained in:
2021-12-25 20:08:40 +04:00
parent e1c404c660
commit 1b3a4786bf
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ namespace Kruzya.TelegramBot.UrlLimitations
{
var targetChat = new ChatId(Chat.Id);
Task.WaitAll(new Task[] {
Bot.KickChatMemberAsync(new ChatId(Chat.Id), From.Id, DateTime.Now.AddDays(1)),
Bot.BanChatMemberAsync(new ChatId(Chat.Id), From.Id, DateTime.Now.AddDays(1)),
Bot.DeleteMessageAsync(targetChat, message.MessageId),
Bot.SendTextMessageAsync(targetChat,
$"Member {From.ToHtml()} has been banned.\n<b>Reason</b>: <pre>Spam suspicion</pre>", ParseMode.Html)