Skip to content

Commit

Permalink
Fix bot-command-relay option not ignoring itself (EssentialsX#4453)
Browse files Browse the repository at this point in the history
  • Loading branch information
JRoy authored Aug 12, 2021
1 parent 35b1a28 commit 1179caa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public DiscordCommandDispatcher(JDADiscordService jda) {
@Override
public void onGuildMessageReceived(@NotNull GuildMessageReceivedEvent event) {
if (jda.getConsoleWebhook() != null && event.getChannel().getId().equals(channelId)) {
if ((event.isWebhookMessage() || event.getAuthor().isBot()) && (!jda.getSettings().isConsoleBotCommandRelay() || DiscordUtil.ACTIVE_WEBHOOKS.contains(event.getAuthor().getId()))) {
if ((event.isWebhookMessage() || event.getAuthor().isBot()) && (!jda.getSettings().isConsoleBotCommandRelay() || DiscordUtil.ACTIVE_WEBHOOKS.contains(event.getAuthor().getId()) || event.getAuthor().getId().equals(event.getGuild().getSelfMember().getId()))) {
return;
}

Expand Down

0 comments on commit 1179caa

Please # to comment.