Skip to content

Commit

Permalink
Document role tags (#2230)
Browse files Browse the repository at this point in the history
* Document role tags

* Make columns smaller

* Fix link to role tags
  • Loading branch information
vaporoxx authored Nov 25, 2020
1 parent 3b5661d commit 7113cee
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions docs/topics/Permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,28 @@ Roles represent a set of permissions attached to a group of users. Roles have un

###### Role Structure

| Field | Type | Description |
| --------------- | --------- | ------------------------------------------------ |
| id | snowflake | role id |
| name | string | role name |
| color | integer | integer representation of hexadecimal color code |
| hoist | boolean | if this role is pinned in the user listing |
| position | integer | position of this role |
| permissions | string | permission bit set |
| managed | boolean | whether this role is managed by an integration |
| mentionable | boolean | whether this role is mentionable |
| Field | Type | Description |
| ----------- | ---------------------------------------------------------------------------- | ------------------------------------------------ |
| id | snowflake | role id |
| name | string | role name |
| color | integer | integer representation of hexadecimal color code |
| hoist | boolean | if this role is pinned in the user listing |
| position | integer | position of this role |
| permissions | string | permission bit set |
| managed | boolean | whether this role is managed by an integration |
| mentionable | boolean | whether this role is mentionable |
| tags? | [role tags](#DOCS_TOPICS_PERMISSIONS/role-object-role-tags-structure) object | the tags this role has |

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

###### Role Tags Structure

| Field | Type | Description |
| ------------------- | --------- | --------------------------------------------------- |
| bot_id? | snowflake | the id of the bot this role belongs to |
| integration_id? | snowflake | the id of the integration this role belongs to |
| premium_subscriber? | null | whether this is the guild's premium subscriber role |

###### Example Role

```json
Expand Down

0 comments on commit 7113cee

Please sign in to comment.