Skip to content
44 changes: 26 additions & 18 deletions docs/resources/guild.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ Fields specific to the `GUILD_CREATE` event are listed in the [Gateway Events do
| VERIFIED | guild is verified |
| VIP_REGIONS | guild has access to set 384kbps bitrate in voice (previously VIP voice servers) |
| WELCOME_SCREEN_ENABLED | guild has enabled the welcome screen |
| ENHANCED_ROLE_COLORS | guild is able to set gradient colors to roles |

###### Mutable Guild Features

Expand Down Expand Up @@ -824,6 +825,11 @@ Returns the [guild](/docs/resources/guild#guild-object) object for the given id.
"permissions": "49794752",
"position": 0,
"color": 0,
"colors": {
"primary_color": 0,
"secondary_color": null,
"tertiary_color": null
},
"hoist": false,
"managed": false,
"mentionable": false
Expand Down Expand Up @@ -1225,15 +1231,16 @@ This endpoint supports the `X-Audit-Log-Reason` header.

###### JSON Params

| Field | Type | Description | Default |
|---------------|-------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| name | string | name of the role, max 100 characters | "new role" |
| permissions | string | bitwise value of the enabled/disabled permissions | @everyone permissions in guild |
| color | integer | RGB color value | 0 |
| hoist | boolean | whether the role should be displayed separately in the sidebar | false |
| icon | ?[image data](/docs/reference#image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) | null |
| unicode_emoji | ?string | the role's unicode emoji as a [standard emoji](/docs/reference#message-formatting) (if the guild has the `ROLE_ICONS` feature) | null |
| mentionable | boolean | whether the role should be mentionable | false |
| Field | Type | Description | Default |
|---------------|-----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
| name | string | name of the role, max 100 characters | "new role" |
| permissions | string | bitwise value of the enabled/disabled permissions | @everyone permissions in guild |
| color | integer | RGB color value | 0 |
| colors | [role colors](/docs/topics/permissions#role-colors-object) object | the role colors | [default role colors object](/docs/topics/permissions#default-role-colors-object) |
| hoist | boolean | whether the role should be displayed separately in the sidebar | false |
| icon | ?[image data](/docs/reference#image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) | null |
| unicode_emoji | ?string | the role's unicode emoji as a [standard emoji](/docs/reference#message-formatting) (if the guild has the `ROLE_ICONS` feature) | null |
| mentionable | boolean | whether the role should be mentionable | false |

## Modify Guild Role Positions
<Route method="PATCH">/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/roles</Route>
Expand Down Expand Up @@ -1268,15 +1275,16 @@ This endpoint supports the `X-Audit-Log-Reason` header.

###### JSON Params

| Field | Type | Description |
|---------------|------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
| name | string | name of the role, max 100 characters |
| permissions | string | bitwise value of the enabled/disabled permissions |
| color | integer | RGB color value |
| hoist | boolean | whether the role should be displayed separately in the sidebar |
| icon | [image data](/docs/reference#image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) |
| unicode_emoji | string | the role's unicode emoji as a [standard emoji](/docs/reference#message-formatting) (if the guild has the `ROLE_ICONS` feature) |
| mentionable | boolean | whether the role should be mentionable |
| Field | Type | Description |
|---------------|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
| name | string | name of the role, max 100 characters |
| permissions | string | bitwise value of the enabled/disabled permissions |
| color | integer | RGB color value |
| colors | [role colors](/docs/topics/permissions#role-colors-object) object | the role's colors |
| hoist | boolean | whether the role should be displayed separately in the sidebar |
| icon | [image data](/docs/reference#image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) |
| unicode_emoji | string | the role's unicode emoji as a [standard emoji](/docs/reference#message-formatting) (if the guild has the `ROLE_ICONS` feature) |
| mentionable | boolean | whether the role should be mentionable |

## Modify Guild MFA Level
<Route method="POST">/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/mfa</Route>
Expand Down
31 changes: 31 additions & 0 deletions docs/topics/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ Roles represent a set of permissions attached to a group of users. Roles have na
| id | snowflake | role id |
| name | string | role name |
| color | integer | integer representation of hexadecimal color code |
| colors | [role colors](/docs/topics/permissions#role-colors-object) object | the role colors |
| hoist | boolean | if this role is pinned in the user listing |
| icon? | ?string | role [icon hash](/docs/reference#image-formatting) |
| unicode_emoji? | ?string | role unicode emoji |
Expand All @@ -233,13 +234,43 @@ Tags with type `null` represent booleans. They will be present and set to `null`
| available_for_purchase? | null | whether this role is available for purchase |
| guild_connections? | null | whether this role is a guild's linked role |

###### Role Colors Object

This object will always be filled with `primary_color` being the role's `color`. Other fields can only be set to a non-null value if the guild has the `ENHANCED_ROLE_COLORS` [guild feature](/docs/resources/guild#guild-object-guild-features).

| Field | Type | Description |
|------------------|----------|----------------------------------------------------------------------------------------------|
| primary_color | integer | the role primary color, this is always the same as the role's `color` |
| secondary_color | ?integer | the role secondary color, this will make the role gradient between the other provided colors |
| tertiary_color | ?integer | the role tertiary color, this will make the role gradient between the other provided colors |

:::info
If you provide a `tertiary_color`, you must follow the holographic style preset. Which is:
`primary_color = 11127295`, `secondary_color = 16759788`, and `tertiary_color = 16761760`.
:::

###### Default Role Colors Object

```json
"colors": {
"primary_color": 0,
"secondary_color": null,
"tertiary_color": null
}
```

###### Example Role

```json
{
"id": "41771983423143936",
"name": "WE DEM BOYZZ!!!!!!",
"color": 3447003,
"colors": {
"primary_color": 3447003,
"secondary_color": null,
"tertiary_color": null
},
"hoist": true,
"icon": "cf3ced8600b777c9486c6d8d84fb4327",
"unicode_emoji": null,
Expand Down