#Get categories in Djs v14

3 messages · Page 1 of 1 (latest)

weary drum
#

• 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.

upbeat grail
#
    async function getChannels(guild) {
        await guild.channels.fetch();
        console.log(guild.channels.cache.filter(channel => channel.type === 'GUILD_CATEGORY').map(category => category.name));
    }
``` even this doesn't work
summer sable
#

Use ChannelType.GuildCategory