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
GuildUpdateCommand
Triggers when a guild has updated one of its attributes. Placeholders can be used to retrieve the changed data.
Placeholders: 32
Old: 18
1.
{oldname}
- old name of the guild
2.
{oldicon}
- old icon of the guild
3.
{oldowner}
- old owner of the guild
4.
{oldafkchannel}
- old afk channel of the guild
5.
{oldtimeout}
- old afk channel timeout of the guild
6.
{oldupdateschannel}
- old updates channel of the guild
7.
{oldruleschannel}
- old rules channel of the guild
8.
{oldsystemchannel}
- old system of the guild
9.
{olddescription}
- old description of the guild
10.
{oldnotifications}
- old notifications settings
11.
{oldexplicitfilter}
- old explicit content filter settings
12.
{oldverificationlvl}
- old verification level of the guild
13.
{oldmfa}
- old MFA Level of the guild
14.
{oldregion}
- old region of the guild
15.
{oldlocale}
- old preferred locale
16.
{oldpartnered}
- old partnered value of the guild
17.
{oldverified}
- old verified value of the guild
18.
{oldvanity}
- old vanity of the guild
New: 18
1.
{newname}
- New name of the guild
2.
{newicon}
- New icon of the guild
3.
{newowner}
- New owner of the guild
4.
{newafkchannel}
- New afk channel of the guild
5.
{newtimeout}
- New afk channel timeout of the guild
6.
{newupdateschannel}
- New updates channel of the guild
7.
{newruleschannel}
- New rules channel of the guild
8.
{newsystemchannel}
- New system of the guild
9.
{newdescription}
- New description of the guild
10.
{newnotifications}
- New notifications settings
11.
{newexplicitfilter}
- New explicit content filter settings
12.
{newverificationlvl}
- New verification level of the guild
13.
{newmfa}
- New MFA Level of the guild
14.
{newregion}
- New region of the guild
15.
{newlocale}
- New preferred locale
16.
{newpartnered}
- New partnered value of the guild
17.
{newverified}
- New verified value of the guild
18.
{newvanity}
- New vanity of the guild
​
Example 1:
The event placed in the main file.
1
bot.GuildUpdateCommand({
2
name: "$getServerVar[channel]",
3
code: `
4
$guildName changed their system channel!
5
Old: {oldsystemchannel}
6
New: {newsystemchannel}
7
`
8
})
9
bot.onGuildUpdate()
Copied!
​
Example 2: The event placed in the
event handler
(its own file)
bot.onGuildUpdate()
- Goes in the main file to be able to call the event!
1
module.exports.GuildUpdateCommand = ({
2
name: "$getServerVar[channel]",
3
code: `
4
$guildName changed their system channel!
5
Old: $channelName[{oldsystemchannel}]
6
New: $channelName[{newsystemchannel}]
7
`
8
})
Copied!
Previous
EmojiDeleteCommand
Next
JoinedCommand
Last modified
10mo ago
Copy link
Contents
Placeholders: 32
Old: 18
New: 18