fix: build and lots of obsolete warnings

This commit is contained in:
Andriy
2025-02-09 17:40:03 +02:00
parent 8917a8ba5f
commit c3a553f68d
29 changed files with 103 additions and 108 deletions
+4 -4
View File
@@ -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
);
}