Ignore channels from a category using filter

let options = await interaction.guild.channels.cache.filter(ch => ch.type == 0).map((channel) => ({
label: `${channel.name}`,
description: `ID: ${channel.id}`,
value: channel.id,
}));
let options = await interaction.guild.channels.cache.filter(ch => ch.type == 0).map((channel) => ({
label: `${channel.name}`,
description: `ID: ${channel.id}`,
value: channel.id,
}));
i'm doing a command to get all the channels and it's working, but I wanted to ignore the channels of a specific category using the filter, how could I do that?
2 Replies
d.js toolkit
d.js toolkit15mo 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.
d.js docs
d.js docs15mo ago
property TextChannel#parent The category parent of this channel