From f69ecc93f6ff095debd24d0a3fe07a6e790e80ed Mon Sep 17 00:00:00 2001 From: West14 <30056636+West14@users.noreply.github.com> Date: Tue, 26 Apr 2022 00:28:39 +0300 Subject: [PATCH] [store] add user balance --- modules/ContentStore/Handler/Store.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/ContentStore/Handler/Store.cs b/modules/ContentStore/Handler/Store.cs index 19d1f34..bfbc8a1 100644 --- a/modules/ContentStore/Handler/Store.cs +++ b/modules/ContentStore/Handler/Store.cs @@ -36,13 +36,17 @@ public class Store : BotEventHandler await Bot.SendTextMessageAsync(Chat.Id, "Reputation is unavailable."); return; } + + var user = From; + var reputation = await _reputation.GetUserReputationAsync(Chat, user); - await Bot.SendTextMessageAsync(Chat.Id, "Чего пожелаете?", replyMarkup: new InlineKeyboardMarkup( - _provider.GetServices() - .OrderBy(x => x.StoreItem.Order) - .Select(x => x.StoreItem.ToButton(From.Id)) - .Chunk(2) - .ToList() + await Bot.SendTextMessageAsync(Chat.Id, $"{user.ToHtml()} ({reputation}), чего пожелаете?", ParseMode.Html, + replyMarkup: new InlineKeyboardMarkup( + _provider.GetServices() + .OrderBy(x => x.StoreItem.Order) + .Select(x => x.StoreItem.ToButton(From.Id)) + .Chunk(2) + .ToList() ) ); }