dc_add_role

dc_add_role(user, role, reason?)#

Adds a role to a user.

Blocking function

Invoking this function can freeze the game. Use it in a task to avoid freezing your game.

Input parameters#

Parameter Type Description
user User The user to add the role to.
role Role The role to add.
reason String The audit log reason.

Output values#

Return values#

  • Null, if successful.

Uncaught exceptions #

  • Throws an exception on failure.
  • missing_permission
    • 50001 - You do not have "Manage Roles" permission
    • 50013 - You may be trying to add a role that is of higher hierachy