Deleting single channel/all channels does not work

2019-08-25 16:07发布

I'm creating a bot that manages a server to get used to JavaScript and the Discord.js library. I tried deleting a channel using this code, but it didn't work.

guild.channel.delete('Making room for new channels')
  .then(deleted => console.log(`Deleted ${deleted.name} to make room for new channels`))
  .catch(console.error);

I've already tried to replace the first line with channel.delete and channel.guild.delete, but I kind of gave up since I have no clue on how to make it delete every channel in the guild.
As bad as this sounds, I'm not trying to destroy any discord server.
Thanks in advance.

0条回答
登录 后发表回答