fix(store): message markup

This commit is contained in:
Andriy
2025-02-09 19:07:50 +02:00
parent 226a15cb1e
commit 0649359c12
+3 -2
View File
@@ -8,6 +8,7 @@ using Kruzya.TelegramBot.Core.Handler;
using Kruzya.TelegramBot.Core.Service;
using Microsoft.Extensions.DependencyInjection;
using Telegram.Bot;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
using Telegram.Bot.Types.ReplyMarkups;
using West.TelegramBot.ContentStore.Service;
@@ -112,12 +113,12 @@ public class Store : CommonHandler
{
await PerformPurchase(mediaService, messageId);
}
catch (Exception)
catch
{
answer = "Товар недоступен";
await Bot.EditMessageText(Chat.Id,
messageId,
$"<b>{From.ToHtml()} попытался купить \"{storeItem.Name}\", но товара в наличии не оказалось.",
$"<b>{From.ToHtml()}</b> попытался купить \"{storeItem.Name}\", но товара в наличии не оказалось.",
ParseMode.Html);
await AnswerQuery(query.Id, answer);
return;