diff --git a/pom.xml b/pom.xml index 6c93545..282a8df 100644 --- a/pom.xml +++ b/pom.xml @@ -445,7 +445,7 @@ com.scarsz.discordsrv DiscordSRV - 1.16.1-SNAPSHOT-190 + 1.16.6 provided diff --git a/src/main/java/com/cnaude/purpleirc/Hooks/DiscordSRVHook.java b/src/main/java/com/cnaude/purpleirc/Hooks/DiscordSRVHook.java index 649699a..dfbe792 100644 --- a/src/main/java/com/cnaude/purpleirc/Hooks/DiscordSRVHook.java +++ b/src/main/java/com/cnaude/purpleirc/Hooks/DiscordSRVHook.java @@ -56,8 +56,12 @@ public class DiscordSRVHook { } else { plugin.logDebug("DiscordSRVHook: Unable to find channel: " + channelName); plugin.logDebug("DiscordSRVHook: Channel list: " + DiscordSRV.getPlugin().getChannels().keySet()); - plugin.logDebug("DiscordSRVHook: Sending message to ChatChannel instead: " + chatChannel.getName()); - DiscordUtil.sendMessage(chatChannel, discordMessage); + if (chatChannel != null) { + plugin.logDebug("DiscordSRVHook: Sending message to ChatChannel instead: " + chatChannel.getName()); + DiscordUtil.sendMessage(chatChannel, discordMessage); + } else { + plugin.logDebug("DiscordSRVHook: No default channel found"); + } } }