.whpl fixed
This commit is contained in:
parent
22c8278673
commit
7de4ade5e5
@ -35,16 +35,16 @@ namespace NadekoBot.Modules.Utility
|
||||
game = game.Trim().ToUpperInvariant();
|
||||
if (string.IsNullOrWhiteSpace(game))
|
||||
return;
|
||||
var arr = (await (umsg.Channel as IGuildChannel).Guild.GetUsersAsync())
|
||||
var usrs = (await (umsg.Channel as IGuildChannel).Guild.GetUsersAsync())
|
||||
.Where(u => u.Game?.Name?.ToUpperInvariant() == game)
|
||||
.Select(u => u.Username)
|
||||
.ToList();
|
||||
|
||||
int i = 0;
|
||||
if (!arr.Any())
|
||||
if (!usrs.Any())
|
||||
await channel.SendErrorAsync("Nobody is playing that game.").ConfigureAwait(false);
|
||||
else
|
||||
await channel.SendConfirmAsync("```css\n" + string.Join("\n", arr.GroupBy(item => (i++) / 2)
|
||||
await channel.SendConfirmAsync($"List of users playing {game} game. Total {usrs.Count}.", "```css\n" + string.Join("\n", usrs.Take(30).GroupBy(item => (i++) / 2)
|
||||
.Select(ig => string.Concat(ig.Select(el => $"• {el,-27}")))) + "\n```")
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user