Discord

Create a Discord guild role

Changed on

Creates a new role in the guild.

Requires the bot to hold the Manage Roles permission. Guilds that added the Zernio bot before role management shipped must re-invite it, because Discord applies the permission set at invite time.

Discord's role hierarchy applies: the bot cannot create a role positioned at or above its own highest role, and cannot grant permissions it does not itself hold. Either attempt returns a 403 carrying Discord's own error.

post/v1/discord/guilds/{guildId}/roles

Request

Path parameters

guildIdstring required

Discord guild snowflake ID

Query parameters

accountIdstring required

SocialAccount _id of the Discord account bound to this guild

Request body

namestring required
colorinteger

Decimal color (0 = no color). 0xFF0000 red is 16711680.

hoistboolean

Display members with this role separately in the member list

mentionableboolean

Allow anyone to @mention this role

permissionsstring

Permissions bitfield as a stringified integer

Response

Role created.

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • warning

      added the new account enum value to the / response property for the response status