description |
---|
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.
bot.channelDeleteCommand({ //Command
channel: "channel ID", //Channel where its being logged
code: `your code` //Code sent to <channel>
})
bot.channelDeleteCommand({
channel: "772414449839636490",
code: `
Channel Deleted:
$oldChannel[name]
`
})
You can use the function $oldChannel[] with the options below to return old channel data:
id
- The ID of the channelname
- The name of the channeltopic
- The topic for this channelposition
- The position of the channelcategoryID
- The ID of the category this channel belongs toguildID
- The ID of the guild this channel belongs tolastMessageID
- The ID of the last message sent here (if any)type
- The type of this channelnsfw
- Whether the channel is nsfw or notslowmode
- The slow mode duration for this channelrawPosition
- The raw position for this channeldeleted
- Whether the channel was deleted or notviewable
- Whether the channel was be seen by the client or notmanageable
- Whether the client can or not manage this channeldeleteable
- Whether this channel can be deleted by the client or not