bot.onChannelDelete
An event that gets executed, if the bot sees a channel deletion. To let the bot listen to the event, add one bot.onChannelDelete() callback inside your mainfile.
This command gets triggered everytime a channel was deleted on a server.

Usage:

1
bot.channelDeleteCommand({ //Command
2
channel: "channel ID", //Channel where its being logged
3
code: `your code` //Code sent to <channel>
4
})
Copied!

Example Command:

1
bot.channelDeleteCommand({
2
channel: "772414449839636490",
3
code: `
4
Channel Deleted:
5
$oldChannel[name]
6
`
7
})
Copied!

Options:

You can use the function $oldChannel[] with the options below to return old channel data:
  • id - The ID of the channel
  • name - The name of the channel
  • topic - The topic for this channel
  • position - The position of the channel
  • categoryID - The ID of the category this channel belongs to
  • guildID - The ID of the guild this channel belongs to
  • lastMessageID - The ID of the last message sent here (if any)
  • type - The type of this channel
  • nsfw - Whether the channel is nsfw or not
  • slowmode - The slow mode duration for this channel
  • rawPosition - The raw position for this channel
  • deleted - Whether the channel was deleted or not
  • viewable - Whether the channel was be seen by the client or not
  • manageable - Whether the client can or not manage this channel
  • deleteable - Whether this channel can be deleted by the client or not
Last modified 1mo ago
Copy link
Edit on GitHub