From 5d5a67b4770db1ab0ef20908a9d724db2139a889 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 26 Jan 2017 08:02:57 +0100 Subject: [PATCH] .whpl fix on many users --- src/NadekoBot/Modules/Utility/Utility.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/src/NadekoBot/Modules/Utility/Utility.cs index dc5e56cd..304b2782 100644 --- a/src/NadekoBot/Modules/Utility/Utility.cs +++ b/src/NadekoBot/Modules/Utility/Utility.cs @@ -116,15 +116,18 @@ namespace NadekoBot.Modules.Utility var arr = (await (Context.Channel as IGuildChannel).Guild.GetUsersAsync()) .Where(u => u.Game?.Name?.ToUpperInvariant() == game) .Select(u => u.Username) + .Shuffle() + .Take(60) .ToList(); int i = 0; if (!arr.Any()) await Context.Channel.SendErrorAsync("Nobody is playing that game.").ConfigureAwait(false); - else + else { await Context.Channel.SendConfirmAsync("```css\n" + string.Join("\n", arr.GroupBy(item => (i++) / 2) .Select(ig => string.Concat(ig.Select(el => $"• {el,-27}")))) + "\n```") .ConfigureAwait(false); + } } [NadekoCommand, Usage, Description, Aliases]