description |
---|
An event that gets executed, if the bot sees a role updated in one of it's servers. To let the bot listen to the event, add one bot.onRoleUpdate() callback inside your mainfile. |
This callback triggers every time a role gets updated
bot.roleUpdateCommand({ //Command
channel: "channel ID", //Channel where its being logged
code: `your code` //Code sent to <channel>
})
bot.roleUpdateCommand({
channel: "772414449839636490",
code: `
Role Name Updated:
Old Name: $oldRole[name]
New Name: $newRole[name]
`
})
You can use these functions $oldRole[] and $newRole[] with the options below to return old and new role data:
id
=> The ID of the rolename
"The name of the roleposition
=> The position of this rolerawPosition
=> The position of this role given by the APIhexColor
=> The hex color for this rolecolor
=> The color of this rolehoist
=> Whether the role is hoisted or notmentionable
=> Whether the role is mentionable or notguildID
=> The ID of the guild the role belongs toeditable
=> Whether the role is editable by the client or notmanaged:
=> Whether this role is managed by discord or not (bot- & booster-roles)deleted:
=> Whether the role was deleted or notpermissions
=> The permissions for this role