Skip to content

Commit 2eb4e78

Browse files
Fix bug allowing /role to give managed roles
1 parent 0a28765 commit 2eb4e78

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/technobot/commands/staff/RoleCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void execute(SlashCommandInteractionEvent event) {
4444

4545
// Check that bot has necessary permissions
4646
Role botRole = event.getGuild().getBotRole();
47-
if (!UtilityMethods.hasPermission(botRole, this.permission)) {
47+
if (!UtilityMethods.hasPermission(botRole, this.permission) || role.isManaged()) {
4848
event.replyEmbeds(EmbedUtils.createError("I couldn't change the roles for that user. Please check my permissions and role position.")).queue();
4949
return;
5050
}

0 commit comments

Comments
 (0)