From 583ffc17d7f5e217918e4af6f90e5671bd17293f Mon Sep 17 00:00:00 2001 From: Logan Gorence Date: Thu, 23 Dec 2021 00:42:00 +0000 Subject: [PATCH] Only forward Discord messages from configured channel. --- .../kubelet/foundation/bifrost/FoundationBifrostPlugin.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/foundation-bifrost/src/main/kotlin/cloud/kubelet/foundation/bifrost/FoundationBifrostPlugin.kt b/foundation-bifrost/src/main/kotlin/cloud/kubelet/foundation/bifrost/FoundationBifrostPlugin.kt index 0946686..cc2a06f 100644 --- a/foundation-bifrost/src/main/kotlin/cloud/kubelet/foundation/bifrost/FoundationBifrostPlugin.kt +++ b/foundation-bifrost/src/main/kotlin/cloud/kubelet/foundation/bifrost/FoundationBifrostPlugin.kt @@ -49,6 +49,9 @@ class FoundationBifrostPlugin : JavaPlugin(), EventListener, Listener { // Prevent this bot from receiving its own messages and creating a feedback loop. if (e.author.id == jda.selfUser.id) return + // Only forward messages from the configured channel. + if (e.channel.id != config.channel.id) return + slF4JLogger.debug( "${e.guild.name} - ${e.channel.name} - ${e.author.name}: ${e.message.contentDisplay}" )