public async Task RemindPostponeLeaderboardAsync() { using var service = GetService <ReminderService>(); var leaderboard = await service.Service.GetLeaderboard(); var items = leaderboard.ToDictionary(o => $"*{o.Item1.GetDisplayName(true)}*", o => $"**{o.Item2.FormatWithSpaces()}x**"); var board = new LeaderboardBuilder("Leaderboard nejvíc odkládajících osob", Context.User, null, null); board.SetData(items); await ReplyAsync(embed : board.Build()); }
public async Task ChannelboardAsync() { using var service = GetService <ChannelStats>(); var user = await Context.User.ConvertToGuildUserAsync(Context.Guild); var data = await service.Service.GetChannelboardDataAsync(Context.Guild, user, ChannelStats.ChannelboardTakeTop); if (data.Count == 0) { await Context.Message.Author.SendPrivateMessageAsync("Ještě nejsou zaznamenány žádné kanály pro tento server."); } var items = data.ToDictionary(o => o.Channel.Name, o => o.Count.FormatWithSpaces()); var leaderboard = new LeaderboardBuilder("Channel leaderboard", Context.User, null, null); leaderboard.SetData(items); await Context.Message.Author.SendPrivateMessageAsync(embed : leaderboard.Build()); }