feat: don't show non-hoisted roles
This commit is contained in:
parent
865bf024f3
commit
0e2ffa7e9a
1 changed files with 14 additions and 12 deletions
|
@ -253,6 +253,7 @@ namespace chord
|
||||||
|
|
||||||
foreach (var roles in client.GetGuild(currentSelectedGuild).Roles)
|
foreach (var roles in client.GetGuild(currentSelectedGuild).Roles)
|
||||||
{
|
{
|
||||||
|
if (roles.IsHoisted) {
|
||||||
if (roles.Members.Count() != 0) {
|
if (roles.Members.Count() != 0) {
|
||||||
var roleName = Regex.Replace(roles.Name, @"[^\u0000-\u007F]+", string.Empty);
|
var roleName = Regex.Replace(roles.Name, @"[^\u0000-\u007F]+", string.Empty);
|
||||||
var node = new TreeNode(roleName);
|
var node = new TreeNode(roleName);
|
||||||
|
@ -271,6 +272,7 @@ namespace chord
|
||||||
rolesDict.TryAdd(Math.Abs(roles.Position - client.GetGuild(currentSelectedGuild).Roles.Count()), node);
|
rolesDict.TryAdd(Math.Abs(roles.Position - client.GetGuild(currentSelectedGuild).Roles.Count()), node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var role in rolesDict)
|
foreach (var role in rolesDict)
|
||||||
{
|
{
|
||||||
|
|
Reference in a new issue