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
RoleDeleteCommand
An event that fires when a role is deleted from a guild. Placeholders can be used to retrieve data from the created role.
​
Placeholders: 10
1.
{id}
- role id
2.
{name}
- role name
3.
{ishoisted}
- true or false
4.
{ismentionable}
- true or false
5.
{color}
- color of deleted role in hex
6.
{guildid}
- guild id of where the role is deleted
7.
{guildname}
- guild name of where the role is deleted
8.
{created}
- date when the role was deleted
9.
{position}
- position of the role from the bottom
10.
{timestamp}
- how long ago the role was created before deletion.
​
Example 1:
The event placed in the main file.
1
bot.RoleDeleteCommand({
2
name: "$getServerVar[channel]",
3
code: `
4
The role {name} was deleted from {guildname}
5
`
6
})
7
bot.onRoleDelete()
Copied!
​
Example 2: The event placed in the
event handler
(its own file)
bot.onRoleDelete()
- Goes in the main file to be able to call the event!
1
module.exports.RoleDeleteCommand = ({
2
name: "$getServerVar[channel]",
3
code: `
4
The role {name} was deleted from {guildname}
5
`
6
})
Copied!
Previous
RoleCreateCommand
Next
UnbanCommand
Last modified
10mo ago
Copy link
Contents
Placeholders: 10