我正在使用discord.js创建一个discord bot,每次删除指定频道时我都需要做一个控制,你知道怎么做吗?我在指南上搜索,但没有找到任何东西
答案 0 :(得分:1)
您确定检查了 Docs 吗?
再试试看。
举个例子:
Client.on("channelDelete", channel=> {
console.log(`${channel.name} Was deleted`);
})
针对特定频道
Client.on("channelDelete", channel=> {
if(channel.id === "TheSpeceficChannelID"){
console.log(`The channel ${channel.name} Was deleted`);
}
})