Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit 54e47fc

Browse files
authored
Merge pull request #232 from BigBotNetwork/greg-dev
Merged!
2 parents ec46776 + d482639 commit 54e47fc

5 files changed

Lines changed: 8 additions & 14 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>Hadder</groupId>
77
<artifactId>Hadder</artifactId>
8-
<version>0.10-ALPHA</version>
8+
<version>0.1-BETA</version>
99

1010
<name>Hadder</name>
1111

src/main/java/com/bbn/hadder/commands/moderation/InviteDetectCommand.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import com.bbn.hadder.core.Perm;
1010
import com.bbn.hadder.core.Perms;
1111
import com.bbn.hadder.utils.MessageEditor;
12-
import net.dv8tion.jda.api.Permission;
1312

1413
@Perms(Perm.MANAGE_SERVER)
1514
public class InviteDetectCommand implements Command {

src/main/java/com/bbn/hadder/commands/moderation/PrefixCommand.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import com.bbn.hadder.core.Perm;
66
import com.bbn.hadder.core.Perms;
77
import com.bbn.hadder.utils.MessageEditor;
8-
import net.dv8tion.jda.api.Permission;
98

109
@Perms(Perm.MANAGE_SERVER)
1110
public class PrefixCommand implements Command {

src/main/java/com/bbn/hadder/commands/owner/TestCommand.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import com.bbn.hadder.commands.Command;
44
import com.bbn.hadder.commands.CommandEvent;
5-
import com.bbn.hadder.core.Perm;
6-
import com.bbn.hadder.core.Perms;
75
import com.bbn.hadder.utils.MessageEditor.MessageType;
86

97
/*

src/main/java/com/bbn/hadder/core/CommandHandler.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,13 @@ public void handle(MessageReceivedEvent event, Rethink rethink, String prefix) {
3535

3636
CommandEvent commandEvent = new CommandEvent(event.getJDA(), event.getResponseNumber(), event.getMessage(), rethink,
3737
config, this, helpCommand, new MessageEditor(rethink, event.getAuthor()));
38-
if (cmd.getClass().getAnnotations().length>0) {
39-
if (!Arrays.asList(cmd.getClass().getAnnotations()).contains(Perms.class)) {
40-
for (Perm perm : cmd.getClass().getAnnotation(Perms.class).value()) {
41-
if (!perm.check(commandEvent)) {
42-
commandEvent.getTextChannel()
43-
.sendMessage(commandEvent.getMessageEditor().getMessage(MessageEditor.MessageType.NO_PERMISSION).build())
44-
.queue();
45-
return;
46-
}
38+
if (cmd.getClass().getAnnotations().length > 0 && !Arrays.asList(cmd.getClass().getAnnotations()).contains(Perms.class)) {
39+
for (Perm perm : cmd.getClass().getAnnotation(Perms.class).value()) {
40+
if (!perm.check(commandEvent)) {
41+
commandEvent.getTextChannel()
42+
.sendMessage(commandEvent.getMessageEditor().getMessage(MessageEditor.MessageType.NO_PERMISSION).build())
43+
.queue();
44+
return;
4745
}
4846
}
4947
}

0 commit comments

Comments
 (0)