Skip to content

Commit 4697b9e

Browse files
committed
Update based on the review
1 parent d393bd6 commit 4697b9e

File tree

2 files changed

+34
-30
lines changed

2 files changed

+34
-30
lines changed

docs/resources/guild.mdx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,16 +1275,18 @@ This endpoint supports the `X-Audit-Log-Reason` header.
12751275

12761276
###### JSON Params
12771277

1278-
| Field | Type | Description |
1279-
|---------------|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
1280-
| name | string | name of the role, max 100 characters |
1281-
| permissions | string | bitwise value of the enabled/disabled permissions |
1282-
| color | integer | RGB color value |
1283-
| colors | [role colors](/docs/topics/permissions#role-colors-object) object | the role's colors |
1284-
| hoist | boolean | whether the role should be displayed separately in the sidebar |
1285-
| icon | [image data](/docs/reference#image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) |
1286-
| unicode_emoji | string | the role's unicode emoji as a [standard emoji](/docs/reference#message-formatting) (if the guild has the `ROLE_ICONS` feature) |
1287-
| mentionable | boolean | whether the role should be mentionable |
1278+
| Field | Type | Description |
1279+
|----------------|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
1280+
| name | string | name of the role, max 100 characters |
1281+
| permissions | string | bitwise value of the enabled/disabled permissions |
1282+
| color* | integer | RGB color value |
1283+
| colors | [role colors](/docs/topics/permissions#role-colors-object) object | the role's colors |
1284+
| hoist | boolean | whether the role should be displayed separately in the sidebar |
1285+
| icon | [image data](/docs/reference#image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) |
1286+
| unicode_emoji | string | the role's unicode emoji as a [standard emoji](/docs/reference#message-formatting) (if the guild has the `ROLE_ICONS` feature) |
1287+
| mentionable | boolean | whether the role should be mentionable |
1288+
1289+
\* `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
12881290

12891291
## Modify Guild MFA Level
12901292
<Route method="POST">/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/mfa</Route>

docs/topics/permissions.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -203,24 +203,26 @@ Roles represent a set of permissions attached to a group of users. Roles have na
203203

204204
###### Role Structure
205205

206-
| Field | Type | Description |
207-
|----------------|------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
208-
| id | snowflake | role id |
209-
| name | string | role name |
210-
| color | integer | integer representation of hexadecimal color code |
211-
| colors | [role colors](/docs/topics/permissions#role-colors-object) object | the role's colors |
212-
| hoist | boolean | if this role is pinned in the user listing |
213-
| icon? | ?string | role [icon hash](/docs/reference#image-formatting) |
214-
| unicode_emoji? | ?string | role unicode emoji |
215-
| position | integer | position of this role (roles with the same position are sorted by id) |
216-
| permissions | string | permission bit set |
217-
| managed | boolean | whether this role is managed by an integration |
218-
| mentionable | boolean | whether this role is mentionable |
219-
| tags? | [role tags](/docs/topics/permissions#role-object-role-tags-structure) object | the tags this role has |
220-
| flags | integer | [role flags](/docs/topics/permissions#role-object-role-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) |
206+
| Field | Type | Description |
207+
|-----------------|------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
208+
| id | snowflake | role id |
209+
| name | string | role name |
210+
| color* | integer | integer representation of hexadecimal color code |
211+
| colors | [role colors](/docs/topics/permissions#role-colors-object) object | the role's colors |
212+
| hoist | boolean | if this role is pinned in the user listing |
213+
| icon? | ?string | role [icon hash](/docs/reference#image-formatting) |
214+
| unicode_emoji? | ?string | role unicode emoji |
215+
| position | integer | position of this role (roles with the same position are sorted by id) |
216+
| permissions | string | permission bit set |
217+
| managed | boolean | whether this role is managed by an integration |
218+
| mentionable | boolean | whether this role is mentionable |
219+
| tags? | [role tags](/docs/topics/permissions#role-object-role-tags-structure) object | the tags this role has |
220+
| flags | integer | [role flags](/docs/topics/permissions#role-object-role-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) |
221221

222222
Roles without colors (`color == 0`) do not count towards the final computed color in the user list.
223223

224+
\* `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
225+
224226
###### Role Tags Structure
225227

226228
Tags with type `null` represent booleans. They will be present and set to `null` if they are "true", and will be not present if they are "false".
@@ -238,11 +240,11 @@ Tags with type `null` represent booleans. They will be present and set to `null`
238240

239241
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).
240242

241-
| Field | Type | Description |
242-
|------------------|----------|----------------------------------------------------------------------------------------------|
243-
| primary_color | integer | the role primary color, this is always the same as the role's `color` |
244-
| secondary_color | ?integer | the role secondary color, this will make the role gradient between the other provided colors |
245-
| tertiary_color | ?integer | the role tertiary color, this will make the role gradient between the other provided colors |
243+
| Field | Type | Description |
244+
|------------------|----------|--------------------------------------------------------------------------------------------------------|
245+
| primary_color | integer | the primary color for the role |
246+
| secondary_color | ?integer | the secondary color for the role, this will make the role a gradient between the other provided colors |
247+
| tertiary_color | ?integer | the tertiary color for the role, this will turn the gradient into a holographic style |
246248

247249
:::info
248250
When sending `tertiary_color` the API enforces the role color to be a holographic style with values of:

0 commit comments

Comments
 (0)