ChannelUpdateCommand
Triggers when a channel is updated in a guild. Placeholders can be used to retrieve data from the updated channel.

Placeholders: 13

  1. 1.
    {oldname} - Before the change
  2. 2.
    {newname} - After the change
  3. 3.
    {oldtopic} - Before the change
  4. 4.
    {newtopic} - After the change
  5. 5.
    {oldtype} - Before the change
  6. 6.
    {newtype} - After the change
  7. 7.
    {oldposition} - Before the change
  8. 8.
    {newposition} - After the change
  9. 9.
    {oldparentid} - Before the change
  10. 10.
    {newparentid} - After the change
  11. 11.
    {id} - The ID of the channel
  12. 12.
    {mention} - The channel mention
  13. 13.
    {guildid} - The ID of the guild where the channel belongs to

Example 1: The event placed in the main file.

1
bot.ChannelUpdateCommand({
2
name: "$getServerVar[channel]",
3
code: `
4
Channel name has been updated!
5
Old: {oldname}
6
New: {newname}
7
`
8
})
9
bot.onChannelDelete()
Copied!

Example 2: The event placed in the event handler (its own file)

bot.onChannelDelete() - Goes in the main file to be able to call the event!
1
module.exports.ChannelDeleteCommand = ({
2
name: "$getServerVar[channel]",
3
code: `
4
Channel name has been updated!
5
Old: {oldname}
6
New: {newname}
7
`
8
})
Copied!
Last modified 4mo ago
Copy link