NPE fix
This commit is contained in:
parent
3ac7814d04
commit
6f0ac9b440
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue