diff --git a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs index dc687cc..7ff09d9 100644 --- a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs +++ b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs @@ -25,6 +25,13 @@ public partial class Administration return; } + // the user can't aar the role which is greater or equal to the bot's highest role + if (role.Position >= ((SocketGuild)ctx.Guild).CurrentUser.GetRoles().Max(x => x.Position)) + { + await Response().Error(strs.hierarchy).SendAsync(); + return; + } + var roles = await _service.ToggleAarAsync(ctx.Guild.Id, role.Id); if (roles.Count == 0) await Response().Confirm(strs.aar_disabled).SendAsync();