mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Update target framework to .NET 5 & telegram-bot-framework. Update bot codebase to use the new framework API.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using BotFramework;
|
||||
using BotFramework.Attributes;
|
||||
using BotFramework.Enums;
|
||||
using BotFramework.Setup;
|
||||
using Kruzya.TelegramBot.CombotAntiSpam.Combot;
|
||||
using Kruzya.TelegramBot.Core.Extensions;
|
||||
@@ -20,7 +21,7 @@ namespace Kruzya.TelegramBot.CombotAntiSpam
|
||||
_combotClient = combotClient;
|
||||
}
|
||||
|
||||
[Message(MessageType.ChatMembersAdded, InChat.Public)]
|
||||
[Message(InChat.Public, MessageFlag.HasNewChatMembers)]
|
||||
public async Task OnUserJoined()
|
||||
{
|
||||
var canKickMembers = ((await Bot.GetChatMemberAsync(Chat, (await Bot.GetMeAsync()).Id)).CanRestrictMembers == true);
|
||||
|
||||
Reference in New Issue
Block a user