Merge remote-tracking branch 'origin/feature/new-dotnet-5' into feature/warns-net5

This commit is contained in:
West14
2021-12-26 13:15:15 +02:00
12 changed files with 157 additions and 35 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ namespace Kruzya.TelegramBot.CombotAntiSpam
if (canKickMembers)
{
await Bot.KickChatMemberAsync(Chat, member.Id);
await Bot.BanChatMemberAsync(Chat, member.Id);
}
}
}
@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>Kruzya.TelegramBot.D2_WhereIsXur</AssemblyName>
<AssemblyName>TelegramBot.D2_WhereIsXur</AssemblyName>
<RootNamespace>Kruzya.TelegramBot.Destiny2.WhereIsXur</RootNamespace>
</PropertyGroup>
+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)