mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Fixes for multiple handlers
This commit is contained in:
@@ -53,7 +53,7 @@ namespace Kruzya.TelegramBot.CombotAntiSpam
|
||||
|
||||
if (canKickMembers)
|
||||
{
|
||||
await Bot.KickChatMemberAsync(Chat, member.Id);
|
||||
await Bot.BanChatMemberAsync(Chat, member.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user