This commit is contained in:
cnaude 2019-12-14 18:49:00 -07:00
parent 3ac7814d04
commit 6f0ac9b440
1 changed files with 8 additions and 4 deletions

View File

@ -43,10 +43,14 @@ public class DiscordListener {
@Subscribe(priority = ListenerPriority.MONITOR)
public void onDiscordGuildMessageReceivedEvent(DiscordGuildMessageReceivedEvent event) {
if (discordPlugin.getConfig().getBoolean("DiscordChatChannelListCommandEnabled")
&& event.getMessage().getContentRaw().equalsIgnoreCase(discordPlugin.getConfig().getString("DiscordChatChannelListCommandMessage"))) {
plugin.logDebug("[onDiscordGuildMessageReceivedEvent] Ignoring DiscordChatChannelListCommandMessage");
return;
try {
if (discordPlugin.getConfig().getBoolean("DiscordChatChannelListCommandEnabled")
&& event.getMessage().getContentRaw().equalsIgnoreCase(discordPlugin.getConfig().getString("DiscordChatChannelListCommandMessage"))) {
plugin.logDebug("[onDiscordGuildMessageReceivedEvent] Ignoring DiscordChatChannelListCommandMessage");
return;
}
} catch (Exception ex) {
plugin.logDebug(ex.getMessage());
}
for (PurpleBot ircBot : plugin.ircBots.values()) {
ircBot.discordChat(event.getMessage().getAuthor().getName(),