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
@@ -54,7 +54,7 @@ public abstract class AbstractAnimationReply : BotEventHandler
animationFileOption.SetValue(animation.FileId);
_db.AddOrUpdate(animationFileOption);
await Bot.SendTextMessageAsync(Chat.Id, "Animation has been set.", replyToMessageId: Message!.ReplyToMessage!.MessageId);
await Bot.SendMessage(Chat.Id, "Animation has been set.", replyParameters: Message!.ReplyToMessage!.MessageId);
}
protected virtual async Task<bool> HandleAnimation()
@@ -84,8 +84,8 @@ public abstract class AbstractAnimationReply : BotEventHandler
return false;
}
await Bot.SendAnimationAsync(Chat.Id, new InputFileId(animationFileId),
replyToMessageId: GetMessageIdToReply() ?? Message?.MessageId);
await Bot.SendAnimation(Chat.Id, new InputFileId(animationFileId),
replyParameters: GetMessageIdToReply() ?? Message?.MessageId);
nextUseOption.SetValue(DateTime.Now + Cooldown);
_db.AddOrUpdate(nextUseOption);
+1 -1
View File
@@ -35,7 +35,7 @@ public class Bayan : AbstractAnimationReply
{
if (await HandleAnimation())
{
await Bot.DeleteMessageAsync(Chat.Id, Message!.MessageId);
await Bot.DeleteMessage(Chat.Id, Message!.MessageId);
}
}