📜  discord bot 创建删除文本通道 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:25.785000             🧑  作者: Mango

代码示例1
You can delete a channel with Channel.delete(). If you'd like to delete the channel a command was sent in, you can do something like this:

message.channel.delete.catch(console.error);
To delete all channels, you can use Collection.each()

// iterate a function through all channels in a guild
message.guild.channels.cache.each((channel) =>
  channel.delete().catch(console.error));