$setUserRoles

Overrides all roles of the given user.

Syntax

$setUserRoles[User ID;Role ID;...]

Parameters

  • User ID (Type: Snowflake || Flag: Required): ID of the user to set the role.
  • Role ID (Type: Snowflake || Flag: Required): Roles to be given to the user. Separate roles using ;.

Example

  1. Create two commands and set the trigger !example for one command and !roles for the other. (!roles is not required)
  • Code with trigger !example:
$nomention
$setUserRoles[$authorID;$roleID[Support]]
We've reset all your roles! Now you have "Support" role.
  • Code with trigger !roles:
$nomention
$userRoles[$authorID]
!roles Cool
BDFD
Moderator
!example We've reset all your roles! Now you have "Support" role. !roles Support

In this example, we will remove all roles and give one role with “Support” name.

What is this?

How $roleID[], $authorID and $userRoled[] works?