mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[store] add user balance
This commit is contained in:
@@ -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<IRandomMediaService>()
|
||||
.OrderBy(x => x.StoreItem.Order)
|
||||
.Select(x => x.StoreItem.ToButton(From.Id))
|
||||
.Chunk(2)
|
||||
.ToList()
|
||||
await Bot.SendTextMessageAsync(Chat.Id, $"<b>{user.ToHtml()} ({reputation})</b>, чего пожелаете?", ParseMode.Html,
|
||||
replyMarkup: new InlineKeyboardMarkup(
|
||||
_provider.GetServices<IRandomMediaService>()
|
||||
.OrderBy(x => x.StoreItem.Order)
|
||||
.Select(x => x.StoreItem.ToButton(From.Id))
|
||||
.Chunk(2)
|
||||
.ToList()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user