$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](../Role/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](../Role/toggleRoles.md): Toggles a user's roles (adds if they don't have it, removes if they do).[$takeRoles](../Role/takeRoles.md): Removes roles from a user.[$setRoles](../Role/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 a built-in cooldown to help prevent excessive usage.
| Property | Value |
|---|---|
| ⏱️ Duration | 6 seconds |
| 🆔 Tracked By | User ID |
| 🌐 Scope | Userupdate |
Functions with the same Scope share cooldowns based on the same
Tracked Byvalue.
💎 Tier 3+ servers bypass this cooldown. See Premium Perks.