threads, forums. parent ID

I might have glossed over where this is. Trying to make a event listener that can see the channel ID of the parent thread or forum.
let channelId = msg.channel.type === 'GUILD_PUBLIC_THREAD' || msg.channel.type === 'GUILD_PRIVATE_THREAD'
? msg.channel.parentId
: msg.channel.id;
let channelId = msg.channel.type === 'GUILD_PUBLIC_THREAD' || msg.channel.type === 'GUILD_PRIVATE_THREAD'
? msg.channel.parentId
: msg.channel.id;
3 Replies
d.js toolkit
d.js toolkit16mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Squid
Squid16mo ago
Channel types are numbers, not strings
d.js docs
d.js docs16mo ago
property GuildChannel#type The type of the channel
Want results from more Discord servers?
Add your server