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
+6 -6
View File
@@ -115,7 +115,7 @@ public class Store : CommonHandler
catch (Exception)
{
answer = "Товар недоступен";
await Bot.EditMessageTextAsync(Chat.Id,
await Bot.EditMessageText(Chat.Id,
messageId,
$"<b>{From.ToHtml()} попытался купить \"{storeItem.Name}\", но товара в наличии не оказалось.",
ParseMode.Html);
@@ -124,7 +124,7 @@ public class Store : CommonHandler
}
reputation = await _reputation.SetUserReputationAsync(Chat, From, reputation - storeItem.Price);
await Bot.EditMessageTextAsync(Chat.Id,
await Bot.EditMessageText(Chat.Id,
messageId,
$"<b>{From.ToHtml()} ({reputation})</b> купил \"{storeItem.Name}\".",
ParseMode.Html);
@@ -141,17 +141,17 @@ public class Store : CommonHandler
switch (randomMedia.Type)
{
case InputMediaType.Photo:
await Bot.SendPhotoAsync(Chat.Id, file,
await Bot.SendVideo(Chat.Id, file,
caption: randomMedia.Caption,
replyToMessageId: messageId,
replyParameters: messageId,
parseMode: ParseMode.Html,
hasSpoiler: randomMedia.Nsfw
);
break;
case InputMediaType.Video:
await Bot.SendVideoAsync(Chat.Id, file,
await Bot.SendVideo(Chat.Id, file,
caption: randomMedia.Caption,
replyToMessageId: messageId,
replyParameters: messageId,
parseMode: ParseMode.Html,
hasSpoiler: randomMedia.Nsfw
);