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
@@ -36,20 +36,20 @@ public class WarnService
{
try
{
await _bot.RestrictChatMemberAsync(
await _bot.RestrictChatMember(
chat.Id,
to.Id,
new ChatPermissions
{
CanSendMessages = false
},
DateTime.Now.AddDays(7)
untilDate: DateTime.Now.AddDays(7)
);
warnCount = 0;
}
catch
{
await _bot.SendTextMessageAsync(chat.Id, "У меня нет прав на блокировку пользователя.");
await _bot.SendMessage(chat.Id, "У меня нет прав на блокировку пользователя.");
}
}