mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
fix: build and lots of obsolete warnings
This commit is contained in:
@@ -26,8 +26,8 @@ public abstract class CommonHandler : BotEventHandler
|
||||
|
||||
protected virtual async Task<Message> Reply(string text)
|
||||
{
|
||||
return await Bot.SendTextMessageAsync(Chat.Id, text,
|
||||
replyToMessageId: Message?.MessageId, parseMode: ParseMode.Html);
|
||||
return await Bot.SendMessage(Chat.Id, text,
|
||||
replyParameters: Message?.MessageId, parseMode: ParseMode.Html);
|
||||
}
|
||||
|
||||
protected async Task<bool> CanPunish()
|
||||
@@ -38,14 +38,14 @@ public abstract class CommonHandler : BotEventHandler
|
||||
|
||||
protected async Task BanMember(long userId, DateTime banEnd)
|
||||
{
|
||||
await Bot.RestrictChatMemberAsync(
|
||||
await Bot.RestrictChatMember(
|
||||
Chat.Id,
|
||||
userId,
|
||||
new ChatPermissions
|
||||
{
|
||||
CanSendMessages = false
|
||||
},
|
||||
banEnd
|
||||
untilDate: banEnd
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user