I'm making a bot that auto-sets up a server, and I was wondering how to delete all channels and categories in a server.
The code is very simple:
message.guild.channels.forEach(channel => channel.delete())
That should do it.
Remember to use this in response of a message, or message will be undefined
message
2.1m questions
2.1m answers
60 comments
57.0k users