Add Role to Role
This command (add_role_to_role
) adds a role to every server member who has another role. Useful if you want to modify server permission setup.
Permissions
Bot Permissions
- The bot must have the
MANAGE_ROLES
permission. - The bot's highest role must be higher in the role hierarchy than the role it is being requested to assign.
- The role being added must be assignable — i.e. it should not be an external integration role.
User Permissions
- The user's highest role must be higher in the role hierarchy than the role they want to be assigned.
Parameters
target_role
Required. This is the role that you want to target. Not to be confused with new_role
.
new_role
Required. This is the role that you want to assign to all users who have the target role. Not to be confused with target_role
.
limit
Optional. Limit the number of members affected. If larger than the maximum value (or left out), the maximum value will be used instead. This value depends on the tier of Shield being used. See the limits section for more information.
ephemeral
Optional. Whether other server members should be able to see the bot's response. Does not affect logging.
Cooldown
Like other commands, cooldowns operate at the server level. This value depends on the tier of Shield being used. The cooldown values are:
Basic | Standard | Advanced |
---|---|---|
1 hour | 30 minutes | 15 minutes |
Limits
The maximum number of members affected depends on the tier of Shield being used. These values are:
Basic | Standard | Advanced |
---|---|---|
25 | 50 | 50 |