Skip to content

Commit 2633ad3

Browse files
advaith1shaydewael
authored andcommitted
Document role flags (discord#6269)
1 parent 99483dd commit 2633ad3

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

docs/topics/Permissions.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,20 @@ Roles represent a set of permissions attached to a group of users. Roles have na
191191

192192
###### Role Structure
193193

194-
| Field | Type | Description |
195-
| -------------- | ---------------------------------------------------------------------------- | ------------------------------------------------- |
196-
| id | snowflake | role id |
197-
| name | string | role name |
198-
| color | integer | integer representation of hexadecimal color code |
199-
| hoist | boolean | if this role is pinned in the user listing |
200-
| icon? | ?string | role [icon hash](#DOCS_REFERENCE/image-formatting)|
201-
| unicode_emoji? | ?string | role unicode emoji |
202-
| position | integer | position of this role |
203-
| permissions | string | permission bit set |
204-
| managed | boolean | whether this role is managed by an integration |
205-
| mentionable | boolean | whether this role is mentionable |
206-
| tags? | [role tags](#DOCS_TOPICS_PERMISSIONS/role-object-role-tags-structure) object | the tags this role has |
194+
| Field | Type | Description |
195+
| -------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
196+
| id | snowflake | role id |
197+
| name | string | role name |
198+
| color | integer | integer representation of hexadecimal color code |
199+
| hoist | boolean | if this role is pinned in the user listing |
200+
| icon? | ?string | role [icon hash](#DOCS_REFERENCE/image-formatting) |
201+
| unicode_emoji? | ?string | role unicode emoji |
202+
| position | integer | position of this role |
203+
| permissions | string | permission bit set |
204+
| managed | boolean | whether this role is managed by an integration |
205+
| mentionable | boolean | whether this role is mentionable |
206+
| tags? | [role tags](#DOCS_TOPICS_PERMISSIONS/role-object-role-tags-structure) object | the tags this role has |
207+
| flags | integer | [role flags](#DOCS_TOPICS_PERMISSIONS/role-object-role-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) |
207208

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

@@ -233,10 +234,17 @@ Tags with type `null` represent booleans. They will be present and set to `null`
233234
"position": 1,
234235
"permissions": "66321471",
235236
"managed": false,
236-
"mentionable": false
237+
"mentionable": false,
238+
"flags": 0
237239
}
238240
```
239241

242+
###### Role Flags
243+
244+
| Flag | Value | Description |
245+
| --------- | ------ | -------------------------------------------------------------------------------------------------------- |
246+
| IN_PROMPT | 1 << 0 | role can be selected by members in an [onboarding](#DOCS_RESOURCES_GUILD/guild-onboarding-object) prompt |
247+
240248
## Permissions For Timed Out Members
241249

242250
Timed out members will temporarily lose all permissions except `VIEW_CHANNEL` and `READ_MESSAGE_HISTORY`. Owners and admin users with `ADMINISTRATOR` permissions are exempt.

0 commit comments

Comments
 (0)