$giveRoles
Grants one or more roles to a specified user.
Usage:
$giveRoles[userID;roleID 1;roleID 2;roleID 3;...]
- userID: The ID of the user you want to give roles to.
- roleID 1;roleID 2;roleID 3;...: A semicolon-separated list of role IDs to grant to the user.
Example:
This example grants the "Muted" role to the command executor.
Useful Functions
[``$roleID``](roleID.md): Retrieves a role's ID based on its name.[``$authorID``](../Member/authorID.md): Returns the ID of the command executor (the user who ran the command).
Related Functions
[``$toggleRoles``](toggleRoles.md): Toggles a user's roles (adds if they don't have it, removes if they do).[``$takeRoles``](takeRoles.md): Removes roles from a user.[``$setRoles``](setRoles.md): Removes all roles from a user and then grants only the specified roles.
Difficulty: Medium
Tags: Give Roles Add Role Grant Role Member Role
Function Cooldown
This function has built-in cooldown. Why? Read more about cooldowns here.
- Cooldown: 6 seconds
- Tracked By: User ID
- Type:
userupdate
Functions with the same type share cooldowns based on the same Tracked By value.