diff --git a/modules/ContentStore/Handler/Store.cs b/modules/ContentStore/Handler/Store.cs index f7aadf2..0467f89 100644 --- a/modules/ContentStore/Handler/Store.cs +++ b/modules/ContentStore/Handler/Store.cs @@ -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, - $"{From.ToHtml()} попытался купить \"{storeItem.Name}\", но товара в наличии не оказалось.", + $"{From.ToHtml()} попытался купить \"{storeItem.Name}\", но товара в наличии не оказалось.", ParseMode.Html); await AnswerQuery(query.Id, answer); return;