Delete All Channels In A Specific Category
How to delete all channels in a specific category in Discord.JS? I tried that oldMember.guild.channels.cache.get(client.tr['Settings'].MainChannelID).parent.channels.cache.forEach
Solution 1:
You can get all the channels that belong to a category using CategoryChannel.children
const category = await oldMember.guild.channels.cache.get(CATEGORY_ID); // You can use `find` instead of `get` to fetch the category using a name: `find(cat => cat.name === 'test')
category.children.forEach(channel => channel.delete())
Post a Comment for "Delete All Channels In A Specific Category"