Skip to content

Commit 1cd2402

Browse files
authored
fixed weirdness
1 parent 4279287 commit 1cd2402

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/de/kittybot/kittybot/commands/utilities/RestrictEmoteCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public RestrictEmoteCommand(){
2323
@Override
2424
public void run(CommandContext ctx){
2525
var emotes = ctx.getMessage().getEmotes();
26-
var roles = new HashSet<>(ctx.getMentionedRolesBag());
26+
var roles = ctx.getMentionedRoles();
2727
if(emotes.isEmpty() || roles.isEmpty()){
2828
sendUsage(ctx);
2929
return;
@@ -33,7 +33,7 @@ public void run(CommandContext ctx){
3333
return;
3434
}
3535
var emote = emotes.get(0);
36-
emote.getManager().setRoles(roles).queue(success -> sendSuccess(ctx, "Successfully set roles"), error -> sendError(ctx, "Failed to set roles.\nPlease try again or report this in our discord"));
36+
emote.getManager().setRoles(new HashSet<>(roles)).queue(success -> sendSuccess(ctx, "Successfully set roles"), error -> sendError(ctx, "Failed to set roles.\nPlease try again or report this in our discord"));
3737
}
3838

3939
}

0 commit comments

Comments
 (0)