v1

latestOpenAPI 3.0.12026-07-17310206.9 KB

Creates a new role in a specified Discord guild.

This function adds a new role to a specified Discord guild with customizable properties. It allows setting various attributes of the role such as name, color, permissions, and position. The function returns a Promise that resolves to the created role object.

post/createRole

Request body

Response

Successful response

idstring required

The ID of the created role

namestring required

The name of the created role

colorinteger required

The color of the created role

hoistboolean required

Whether the created role is hoisted

positioninteger required

The position of the created role

permissionsstring required

The permissions of the created role

mentionableboolean required

Whether the created role is mentionable

managedboolean required

Whether the created role is managed

descriptionstring

The description of the created role (if provided)