Fixed roles order

This commit is contained in:
Kwoth 2016-10-10 02:40:50 +02:00
parent 75c4da7edd
commit ae8429f0b0

View File

@ -127,11 +127,11 @@ namespace NadekoBot.Modules.Utility
return; return;
if (target != null) if (target != null)
{ {
await msg.Reply($"`Page #{page} of roles for **{target.Username}**:` \n• " + string.Join("\n• ", target.Roles.Skip((page-1) * RolesPerPage).Take(RolesPerPage).Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position)).SanitizeMentions()); await msg.Reply($"`Page #{page} of roles for **{target.Username}**:` \n• " + string.Join("\n• ", target.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage)).SanitizeMentions());
} }
else else
{ {
await msg.Reply($"`Page #{page} of all roles on this server:` \n• " + string.Join("\n• ", guild.Roles.Skip((page - 1) * RolesPerPage).Take(RolesPerPage).Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position)).SanitizeMentions()); await msg.Reply($"`Page #{page} of all roles on this server:` \n• " + string.Join("\n• ", guild.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage)).SanitizeMentions());
} }
} }