From 579fb01a203360c9fdbb6ef1821621f6b93d5917 Mon Sep 17 00:00:00 2001 From: AwesomeToaster Date: Wed, 29 Sep 2021 22:10:25 +0100 Subject: [PATCH] Don't respond to messages unless they're in a text channel with "music" in the name. --- src/main/java/moe/nekojimi/chords/Main.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/moe/nekojimi/chords/Main.java b/src/main/java/moe/nekojimi/chords/Main.java index 2884db5..5d723a7 100644 --- a/src/main/java/moe/nekojimi/chords/Main.java +++ b/src/main/java/moe/nekojimi/chords/Main.java @@ -93,6 +93,10 @@ public class Main extends ListenerAdapter String content = message.getContentRaw(); Guild guild = event.getGuild(); + // Ignore message if it's not in a music channel + if (!event.getChannel().getName().contains("music")) + return; + // Ignore message if bot if (author.isBot()) return;