Fixed .b and .sb

This commit is contained in:
Kwoth 2016-10-25 07:51:15 +02:00
parent 579c339cf0
commit eb94f61bad

View File

@ -306,11 +306,6 @@ namespace NadekoBot.Modules.Administration
await channel.SendMessageAsync("You can't use this command on users with a role higher or equal to yours in the role hierarchy.");
return;
}
if (umsg.Author.Id != user.Guild.OwnerId && user.Roles.Max().Position >= ((IGuildUser)umsg.Author).Roles.Max().Position)
{
await channel.SendMessageAsync("You can't use this command on users with a role higher or equal to yours in the role hierarchy.");
return;
}
try
{
await (await user.CreateDMChannelAsync()).SendMessageAsync($"**You have been BANNED from `{channel.Guild.Name}` server.**\n" +
@ -340,7 +335,7 @@ namespace NadekoBot.Modules.Administration
{
msg = "No reason provided.";
}
if (umsg.Author.Id != user.Guild.OwnerId && user.Roles.Max().Position >= ((IGuildUser)umsg.Author).Roles.Max().Position)
if (umsg.Author.Id != user.Guild.OwnerId && user.Roles.Select(r => r.Position).Max() >= ((IGuildUser)umsg.Author).Roles.Select(r => r.Position).Max())
{
await channel.SendMessageAsync("You can't use this command on users with a role higher or equal to yours in the role hierarchy.");
return;