Skip to content

Commit 55b9b8b

Browse files
committed
hotfix perm check for restrict emotes command
1 parent bb7a84b commit 55b9b8b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ public RestrictEmoteCommand(){
2222

2323
@Override
2424
public void run(CommandContext ctx){
25+
if(!ctx.getMember().hasPermission(Permission.MANAGE_EMOTES, Permission.MANAGE_ROLES)){
26+
sendNoPerms(ctx);
27+
return;
28+
}
2529
var emotes = ctx.getMessage().getEmotes();
2630
var roles = ctx.getMentionedRoles();
2731
if(emotes.isEmpty() || roles.isEmpty()){

0 commit comments

Comments
 (0)