Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Commit

Permalink
Fixed requiresMention not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastian committed Aug 6, 2018
1 parent 9cbac8b commit 8ecd4f5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private void handleMessageCreate(final MessageReceivedEvent event) {
Command commandAnnotation = command.getCommandAnnotation();
if (commandAnnotation.requiresMention()) {
Matcher matcher = USER_MENTION.matcher(commandString);
if (!matcher.find() || matcher.group("id").equals(event.getClient().getOurUser().getStringID())) {
if (!matcher.find() || !matcher.group("id").equals(event.getClient().getOurUser().getStringID())) {
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void handleMessageCreate(DiscordApi api, final MessageCreateEvent event)
Command commandAnnotation = command.getCommandAnnotation();
if (commandAnnotation.requiresMention()) {
Matcher matcher = USER_MENTION.matcher(commandString);
if (!matcher.find() || matcher.group("id").equals(api.getYourself().getIdAsString())) {
if (!matcher.find() || !matcher.group("id").equals(api.getYourself().getIdAsString())) {
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private void handleMessageCreate(final MessageReceivedEvent event) {
Command commandAnnotation = command.getCommandAnnotation();
if (commandAnnotation.requiresMention()) {
Matcher matcher = USER_MENTION.matcher(commandString);
if (!matcher.find() || matcher.group("id").equals(jda.getSelfUser().getId())) {
if (!matcher.find() || !matcher.group("id").equals(jda.getSelfUser().getId())) {
return;
}
}
Expand Down

0 comments on commit 8ecd4f5

Please sign in to comment.