diff --git a/src/main/java/ml/duncte123/skybot/commands/guild/owner/settings/SettingsCommand.java b/src/main/java/ml/duncte123/skybot/commands/guild/owner/settings/SettingsCommand.java index 2c1079ec7..186520e63 100644 --- a/src/main/java/ml/duncte123/skybot/commands/guild/owner/settings/SettingsCommand.java +++ b/src/main/java/ml/duncte123/skybot/commands/guild/owner/settings/SettingsCommand.java @@ -663,20 +663,19 @@ private Role getFoundRoleOrNull(CommandContext ctx) { return null; } - final Role.RoleTags tags = foundRole.getTags(); + if (foundRole.isManaged()) { + final Role.RoleTags tags = foundRole.getTags(); + + if (tags.isBot()) { + sendMsg(ctx, "I cannot give this role to members because it belongs to <@" + tags.getBotIdLong() + '>'); + } else if (tags.isBoost()) { + sendMsg(ctx, "I cannot give the boost role to members"); + } else if (tags.isIntegration()) { + sendMsg(ctx, "I cannot give this role to members because it is managed by an integration (for example twitch subscriber roles)"); + } else { + sendMsg(ctx, "This role cannot be used, but I don't know why (`unknown managed role`)"); + } - if (tags.isBot()) { - sendMsg(ctx, "I cannot give this role to members because it belongs to <@" + tags.getBotIdLong() + '>'); - return null; - } - - if (tags.isBoost()) { - sendMsg(ctx, "I cannot give the boost role to members"); - return null; - } - - if (tags.isIntegration()) { - sendMsg(ctx, "I cannot give this role to members because it is managed by an integration (for example twitch subscriber roles)"); return null; }