Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 1.49 KB

bot.onroleupdate.md

File metadata and controls

53 lines (41 loc) · 1.49 KB
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.

bot.onRoleUpdate

This callback triggers every time a role gets updated

Usage:

bot.roleUpdateCommand({ //Command
channel: "channel ID", //Channel where its being logged
code: `your code` //Code sent to <channel>
})

Example Command:

bot.roleUpdateCommand({ 
channel: "772414449839636490", 
code: `
Role Name Updated:
Old Name: $oldRole[name]
New Name: $newRole[name]
`
})

Options:

You can use these functions $oldRole[] and $newRole[] with the options below to return old and new role data:

  • id => The ID of the role
  • name "The name of the role
  • position => The position of this role
  • rawPosition => The position of this role given by the API
  • hexColor => The hex color for this role
  • color => The color of this role
  • hoist => Whether the role is hoisted or not
  • mentionable => Whether the role is mentionable or not
  • guildID => The ID of the guild the role belongs to
  • editable => Whether the role is editable by the client or not
  • managed: => Whether this role is managed by discord or not (bot- & booster-roles)
  • deleted: => Whether the role was deleted or not
  • permissions => The permissions for this role