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
+1 -7
View File
@@ -60,17 +60,11 @@ public class Ban : CommonHandler
return;
}
await Bot.RestrictChatMemberAsync(Chat.Id, RepliedUser!.Id,
await Bot.RestrictChatMember(Chat.Id, RepliedUser!.Id,
new ChatPermissions
{
CanSendMessages = true,
CanChangeInfo = true,
CanInviteUsers = true,
CanPinMessages = true,
CanSendPolls = true,
CanSendMediaMessages = true,
CanSendOtherMessages = true,
CanAddWebPagePreviews = true
});
await Reply($"{From.ToHtml()} <code>разблокировал</code> {RepliedUser!.ToHtml()}");
+2 -2
View File
@@ -46,7 +46,7 @@ public class Greet : BotEventHandler
reply.Text("Пожалуйста, ознакомьтесь с правилами. /rules");
}
await Bot.SendTextMessageAsync(Chat.Id, string.Format(reply.ToString(), membersHtml),
parseMode: ParseMode.Html, replyToMessageId: message.MessageId);
await Bot.SendMessage(Chat.Id, string.Format(reply.ToString(), membersHtml),
parseMode: ParseMode.Html, replyParameters: message.MessageId);
}
}