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:
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user