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
@@ -19,9 +19,9 @@ public class Handler : BotEventHandler
return;
}
await Bot.SendChatActionAsync(Chat.Id, ChatAction.UploadDocument);
await Bot.SendChatAction(Chat.Id, ChatAction.UploadDocument);
using var file = new MemoryStream();
await Bot.GetInfoAndDownloadFileAsync(sticker.FileId, file);
await Bot.GetInfoAndDownloadFile(sticker.FileId, file);
file.Position = 0;
using var img = await Image.LoadAsync(file);
@@ -30,7 +30,7 @@ public class Handler : BotEventHandler
using var outfile = new MemoryStream();
await img.SaveAsPngAsync(outfile);
outfile.Position = 0;
await Bot.SendDocumentAsync(Chat.Id, new InputFile(outfile, "sticker.png"),
replyToMessageId: RawUpdate?.Message?.MessageId);
await Bot.SendDocument(Chat.Id, new InputFileStream(outfile, "sticker.png"),
replyParameters: RawUpdate?.Message?.MessageId);
}
}