better .whoplays format

This commit is contained in:
Master Kwoth 2016-06-02 21:31:06 +02:00
parent 57c7a9cd3e
commit e96189b944

View File

@ -987,14 +987,16 @@ namespace NadekoBot.Modules.Administration
return;
var en = e.Server.Users
.Where(u => u.CurrentGame?.Name?.ToUpperInvariant() == game)
.Select(u => $"{u.Name}");
.Select(u => u.Name);
var arr = en as string[] ?? en.ToArray();
int i = 0;
if (arr.Length == 0)
await e.Channel.SendMessage("Nobody. (not 100% sure)");
else
await e.Channel.SendMessage("• " + string.Join("\n• ", arr));
await e.Channel.SendMessage(string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Join(" ", ig.Select(el => $"{el,-35}")))));
});
});