[store] add user balance

This commit is contained in:
West14
2022-04-26 00:28:39 +03:00
parent 7b4c5aa3d4
commit f69ecc93f6
+10 -6
View File
@@ -36,13 +36,17 @@ public class Store : BotEventHandler
await Bot.SendTextMessageAsync(Chat.Id, "Reputation is unavailable."); await Bot.SendTextMessageAsync(Chat.Id, "Reputation is unavailable.");
return; return;
} }
var user = From;
var reputation = await _reputation.GetUserReputationAsync(Chat, user);
await Bot.SendTextMessageAsync(Chat.Id, его пожелаете?", replyMarkup: new InlineKeyboardMarkup( await Bot.SendTextMessageAsync(Chat.Id, $"<b>{user.ToHtml()} ({reputation})</b>, чего пожелаете?", ParseMode.Html,
_provider.GetServices<IRandomMediaService>() replyMarkup: new InlineKeyboardMarkup(
.OrderBy(x => x.StoreItem.Order) _provider.GetServices<IRandomMediaService>()
.Select(x => x.StoreItem.ToButton(From.Id)) .OrderBy(x => x.StoreItem.Order)
.Chunk(2) .Select(x => x.StoreItem.ToButton(From.Id))
.ToList() .Chunk(2)
.ToList()
) )
); );
} }