mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
fix: build and lots of obsolete warnings
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user