File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed
src/main/java/ml/duncte123/skybot/commands/guild/owner/settings Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -663,20 +663,19 @@ private Role getFoundRoleOrNull(CommandContext ctx) {
663663 return null ;
664664 }
665665
666- final Role .RoleTags tags = foundRole .getTags ();
666+ if (foundRole .isManaged ()) {
667+ final Role .RoleTags tags = foundRole .getTags ();
668+
669+ if (tags .isBot ()) {
670+ sendMsg (ctx , "I cannot give this role to members because it belongs to <@" + tags .getBotIdLong () + '>' );
671+ } else if (tags .isBoost ()) {
672+ sendMsg (ctx , "I cannot give the boost role to members" );
673+ } else if (tags .isIntegration ()) {
674+ sendMsg (ctx , "I cannot give this role to members because it is managed by an integration (for example twitch subscriber roles)" );
675+ } else {
676+ sendMsg (ctx , "This role cannot be used, but I don't know why (`unknown managed role`)" );
677+ }
667678
668- if (tags .isBot ()) {
669- sendMsg (ctx , "I cannot give this role to members because it belongs to <@" + tags .getBotIdLong () + '>' );
670- return null ;
671- }
672-
673- if (tags .isBoost ()) {
674- sendMsg (ctx , "I cannot give the boost role to members" );
675- return null ;
676- }
677-
678- if (tags .isIntegration ()) {
679- sendMsg (ctx , "I cannot give this role to members because it is managed by an integration (for example twitch subscriber roles)" );
680679 return null ;
681680 }
682681
You can’t perform that action at this time.
0 commit comments