DB-Script
Discord Server
NPM
Search…
DB-Script
Getting Started
NPM Updates
Known Bugs
Functionalities
Bot Functions
Events
BanCommand
BotJoinCommand
BotLeaveCommand
ChannelCreateCommand
ChannelDeleteCommand
ChannelUpdateCommand
EmojiCreateCommand
EmojiDeleteCommand
GuildUpdateCommand
JoinedCommand
LeaveCommand
LoopCommand
MessageDeleteCommand
MessageEditEvent
RateLimitCommand
ReadyCommand
ReactionAddCommand
ReactionRemoveCommand
RoleCreateCommand
RoleDeleteCommand
UnbanCommand
UserUpdateCommand
Functions
Guides
Other
Contributors
Discord Server
FAQs
Staff
Powered By
GitBook
ChannelUpdateCommand
Triggers when a channel is updated in a guild. Placeholders can be used to retrieve data from the updated channel.
​
Placeholders: 13
1.
{oldname}
- Before the change
2.
{newname}
- After the change
3.
{oldtopic}
- Before the change
4.
{newtopic}
- After the change
5.
{oldtype}
- Before the change
6.
{newtype}
- After the change
7.
{oldposition}
- Before the change
8.
{newposition}
- After the change
9.
{oldparentid}
- Before the change
10.
{newparentid}
- After the change
11.
{id}
- The ID of the channel
12.
{mention}
- The channel mention
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!
Previous
ChannelDeleteCommand
Next
EmojiCreateCommand
Last modified
11mo ago
Copy link
Contents
Placeholders: 13