Passa al contenuto principale

Roles

Actions in the category "Roles".

Create role​

Creates a new role on your server.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
NameTextYesName of the role. Length: 1 to 100 characters. Default: new role.
ColorColorNoColor of the role.
Display separatelyYes/NoYesShow members with this role separately in the member list. Default: No.
Anyone can mentionYes/NoYesAllow @mentioning the role. Default: No.
PermissionsList of PermissionYesPermissions granted by the role. Default: [].
Audit log reasonTextNoReason recorded in the audit log. Maximum length: 512 characters.

Outputs

NameTypeDetails
Created roleRoleThe newly created role.

Delete role​

Permanently deletes a role from the server.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to delete.
Audit Log ReasonTextNoReason logged in the audit log. Maximum length: 512 characters.

Update role name​

Renames a role.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to update.
NameTextYesThe new role name (1-100 characters). Length: 1 to 100 characters.
Audit Log ReasonTextNoReason logged in the audit log. Maximum length: 512 characters.

Outputs

NameTypeDetails
RoleRoleThe updated role.

Update role color​

Changes the display color of a role.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to update.
ColorColorYesThe new color, or empty to clear it.
Audit Log ReasonTextNoReason logged in the audit log. Maximum length: 512 characters.

Outputs

NameTypeDetails
RoleRoleThe updated role.

Update role hoist​

Sets whether members of this role are displayed separately in the member list.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to update.
HoistYes/NoYesWhether to hoist the role.
Audit Log ReasonTextNoReason logged in the audit log. Maximum length: 512 characters.

Outputs

NameTypeDetails
RoleRoleThe updated role.

Allow or block role mentions​

Sets whether the role can be mentioned by anyone.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to update.
Anyone can mentionYes/NoYesWhether anyone can mention the role.
Audit Log ReasonTextNoReason logged in the audit log. Maximum length: 512 characters.

Outputs

NameTypeDetails
RoleRoleThe updated role.

Update role permissions​

Replaces the permission set granted by a role.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to update.
PermissionsList of PermissionYesThe full permission flag set for the role.
Audit Log ReasonTextNoReason logged in the audit log. Maximum length: 512 characters.

Outputs

NameTypeDetails
RoleRoleThe updated role.

Update role position​

Moves a role to the given position in the role hierarchy.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to move.
PositionWhole numberYesThe new position (0 is lowest). Minimum: 0.
Audit Log ReasonTextNoReason logged in the audit log. Maximum length: 512 characters.

Outputs

NameTypeDetails
RoleRoleThe updated role.

Update role icon​

Sets a custom icon for the role from a URL or attachment.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to update.
Icon URLURLNoURL of the icon image. Mutually exclusive with attachment. Use only one of these: Attachment.
AttachmentAttachmentNoAttachment to use as the icon. Mutually exclusive with icon URL. Use only one of these: Icon URL.
Audit Log ReasonTextNoReason logged in the audit log. Maximum length: 512 characters.

Outputs

NameTypeDetails
RoleRoleThe updated role.

Update role Unicode emoji​

Sets the role's icon to a unicode emoji, or clears it when empty.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to update.
Unicode EmojiTextYesThe unicode emoji to use, or empty to clear. Maximum length: 16 characters.
Audit Log ReasonTextNoReason logged in the audit log. Maximum length: 512 characters.

Outputs

NameTypeDetails
RoleRoleThe updated role.

Assign role to many members​

Adds a role to a list of members in bulk.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to assign.
MembersList of Server memberYesThe members that should receive the role.
Audit Log ReasonTextNoReason logged in the audit log. Maximum length: 512 characters.

Outputs

NameTypeDetails
Succeeded IDsList of Discord IDMember IDs that successfully received the role.
Failed IDsList of Discord IDMember IDs for which the assignment failed.

Fetch role by ID​

Looks up a role using its ID.

Inputs

NameTypeRequiredDetails
Role IDDiscord IDYesThe role ID to look up.

Outputs

NameTypeDetails
RoleRoleThe found role, or empty if it does not exist. May be empty.

Fetch roles of server​

Returns all roles defined in the server.

Outputs

NameTypeDetails
RolesList of RoleThe list of roles.

Bulk set role positions​

Repositions multiple roles in a single API call. Requires MANAGE_ROLES.

Required permissions: Manage roles.

Inputs

NameTypeRequiredDetails
UpdatesList of Role position updateYesList of position updates to apply. Minimum items: 1.

Create role position update​

Builds a single role reposition entry (a role plus its new position) for Bulk set role positions. Collect entries with Add role position or Add item to list.

Inputs

NameTypeRequiredDetails
RoleRoleYesThe role to move.
PositionWhole numberYesThe role's new position (0 is lowest). Minimum: 0.

Outputs

NameTypeDetails
Position UpdateRole position updateThe constructed role position update.

Add role position​

Appends a role reposition entry (a role plus its new position) to a list and returns the updated list. Leave the list empty to start a new one; use the result in Bulk set role positions.

Inputs

NameTypeRequiredDetails
UpdatesList of Role position updateNoThe position-update list to extend (leave empty to start a new list). Maximum items: 250.
RoleRoleYesThe role to move.
PositionWhole numberYesThe role's new position (0 is lowest). Minimum: 0.

Outputs

NameTypeDetails
UpdatesList of Role position updateThe updated position-update list.

Fetch role by name​

Finds a role on the server by its name. Returns an empty value if no role matches.

Inputs

NameTypeRequiredDetails
NameTextYesRole name to search for. Length: 1 to 100 characters.
Case sensitiveYes/NoYesMatch upper/lower case exactly. Default: No.

Outputs

NameTypeDetails
RoleRoleThe first matching role, or empty. May be empty.
Need more help?
Can't find what you're looking for? Our team is happy to help.