How to specify the ID of a forum channel?

I have an app that sends messages to a database if they are in the pre-approved channel. I'm using the code below. This works fine when the message comes from a regular channel, but not a forum channel. Should channel.id be something else for forum channels? if (allowedChannels.some(channel => channel.channel_id === message.channel.id))
4 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
probablyraging
ThreadChannel has an id property which is the thread channel's id, and I believe it also has a parennt property which contains the forum channel's id for which the thread is a child of So, when a message is sent in a thread channel, you're looking for; - channel.id - thread channel ID - channel.parent.id - forum channel ID
ManuelMaccou | Mosaic
That did it! Thank you very much
probablyraging
Pleasure
Want results from more Discord servers?
Add your server