Skip to content

Instantly share code, notes, and snippets.

@TheNoobWar
Created December 4, 2019 02:18
Show Gist options
  • Save TheNoobWar/9f061967fc994b6613b06e2ac59a8d35 to your computer and use it in GitHub Desktop.
Save TheNoobWar/9f061967fc994b6613b06e2ac59a8d35 to your computer and use it in GitHub Desktop.
Discord.js delete every channel in a guild
const Discord = require('discord.js');
const client = new Discord.Client();
client.once('ready', () => {
console.log('Ready!');
var server = client.guilds.get('Server ID here');
for (var i = 0; i < server.channels.array().length; i++) {
server.channels.array()[i].delete();
}
console.log('Done!');
});
client.login('Token ID here');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment