From 2f8768cec9b082c78a65d9f64fa0ddaadef5f008 Mon Sep 17 00:00:00 2001 From: Austin Shapiro Date: Tue, 13 Mar 2018 19:58:31 -0700 Subject: [PATCH] Fix NoSuchMethodError with DiscordSRV hook Caused by: java.lang.NoSuchMethodError: github.scarsz.discordsrv.dependencies.jda.core.entities.Message.getContent()Ljava/lang/String; --- .../com/cnaude/purpleirc/GameListeners/DiscordListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cnaude/purpleirc/GameListeners/DiscordListener.java b/src/main/java/com/cnaude/purpleirc/GameListeners/DiscordListener.java index c8c855f..1bcc7c5 100644 --- a/src/main/java/com/cnaude/purpleirc/GameListeners/DiscordListener.java +++ b/src/main/java/com/cnaude/purpleirc/GameListeners/DiscordListener.java @@ -44,7 +44,7 @@ public class DiscordListener { @Subscribe(priority = ListenerPriority.MONITOR) public void onDiscordGuildMessageReceivedEvent(DiscordGuildMessageReceivedEvent event) { if (discordPlugin.getConfig().getBoolean("DiscordChatChannelListCommandEnabled") - && event.getMessage().getContent().equalsIgnoreCase(discordPlugin.getConfig().getString("DiscordChatChannelListCommandMessage"))) { + && event.getMessage().getContentRaw().equalsIgnoreCase(discordPlugin.getConfig().getString("DiscordChatChannelListCommandMessage"))) { plugin.logDebug("[onDiscordGuildMessageReceivedEvent] Ignoring DiscordChatChannelListCommandMessage"); return; } @@ -54,7 +54,7 @@ public class DiscordListener { event.getMember().getEffectiveName(), event.getMember().getColor(), event.getChannel().getName(), - event.getMessage().getContent()); + event.getMessage().getContentDisplay()); } }