From f1157f424b0cde47501d5afd6c99f83a5de2c6eb Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 6 Mar 2017 04:20:06 +0100 Subject: [PATCH] inrole now shows the number of users in a given role --- src/NadekoBot/Modules/Utility/Utility.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/src/NadekoBot/Modules/Utility/Utility.cs index 0452dab6..38951dd5 100644 --- a/src/NadekoBot/Modules/Utility/Utility.cs +++ b/src/NadekoBot/Modules/Utility/Utility.cs @@ -225,8 +225,9 @@ namespace NadekoBot.Modules.Utility var usrs = (await Context.Guild.GetUsersAsync()).ToArray(); foreach (var role in roles.Where(r => r.Id != Context.Guild.Id)) { - send += $"```css\n[{role.Name}]\n"; - send += string.Join(", ", usrs.Where(u => u.RoleIds.Contains(role.Id)).Select(u => u.ToString())); + var roleUsers = usrs.Where(u => u.RoleIds.Contains(role.Id)).Select(u => u.ToString()).ToArray(); + send += $"```css\n[{role.Name}] ({roleUsers.Length})\n"; + send += string.Join(", ", roleUsers); send += "\n```"; } var usr = (IGuildUser)Context.User;