feat: don't render role if it has no members in it
This commit is contained in:
parent
6b75d8e446
commit
23028d29ed
1 changed files with 13 additions and 11 deletions
|
@ -253,6 +253,7 @@ namespace chord
|
|||
|
||||
foreach (var roles in client.GetGuild(currentSelectedGuild).Roles)
|
||||
{
|
||||
if (roles.Members.Count() != 0) {
|
||||
var roleName = Regex.Replace(roles.Name, @"[^\u0000-\u007F]+", string.Empty);
|
||||
var node = new TreeNode(roleName);
|
||||
|
||||
|
@ -269,6 +270,7 @@ namespace chord
|
|||
|
||||
rolesDict.TryAdd(roles.Position, node);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var role in rolesDict)
|
||||
{
|
||||
|
|
Reference in a new issue