Reputation: 135
I'm creating a discord bot using discord.js, I need to do a control every time a specified channel is deleted, do you know how to do it? I searched on the guide but I didn't find anything
Upvotes: 0
Views: 244
Reputation: 723
You sure you checked the Docs ?
Try checking it again.
Here's an example:
Client.on("channelDelete", channel=> {
console.log(`${channel.name} Was deleted`);
})
For a specific channel
Client.on("channelDelete", channel=> {
if(channel.id === "TheSpeceficChannelID"){
console.log(`The channel ${channel.name} Was deleted`);
}
})
Upvotes: 1