mirror of
https://github.com/GayPizzaSpecifications/foundation.git
synced 2025-08-03 05:30:55 +00:00
Only forward Discord messages from configured channel.
This commit is contained in:
parent
e45f46dc71
commit
583ffc17d7
@ -49,6 +49,9 @@ class FoundationBifrostPlugin : JavaPlugin(), EventListener, Listener {
|
|||||||
// Prevent this bot from receiving its own messages and creating a feedback loop.
|
// Prevent this bot from receiving its own messages and creating a feedback loop.
|
||||||
if (e.author.id == jda.selfUser.id) return
|
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(
|
slF4JLogger.debug(
|
||||||
"${e.guild.name} - ${e.channel.name} - ${e.author.name}: ${e.message.contentDisplay}"
|
"${e.guild.name} - ${e.channel.name} - ${e.author.name}: ${e.message.contentDisplay}"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user