diff --git a/docs/Reference.md b/docs/Reference.md index 164b931ab4..00974cfba1 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -318,6 +318,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be | Sticker Pack Banner | app-assets/710982414301790216/store/[sticker_pack_banner_asset_id](#DOCS_RESOURCES_STICKER/sticker-pack-object).png | PNG, JPEG, WebP | | Team Icon | team-icons/[team_id](#DOCS_TOPICS_TEAMS/team-object)/[team_icon](#DOCS_TOPICS_TEAMS/team-object).png | PNG, JPEG, WebP | | Sticker | stickers/[sticker_id](#DOCS_RESOURCES_STICKER/sticker-object).png \*\*\* \*\*\*\* | PNG, Lottie | +| Role Icon | role-icons/[role_id](#DOCS_TOPICS_PERMISSIONS/role-object)/[role_icon](#DOCS_TOPICS_PERMISSIONS/role-object).png \* | PNG, JPEG, WebP | \* In the case of endpoints that support GIFs, the hash will begin with `a_` if it is available in GIF format. (example: `a_1269e74af4df7417b13759eae50c83dc`) diff --git a/docs/resources/Audit_Log.md b/docs/resources/Audit_Log.md index c5c8e83ed6..dcbeda0699 100644 --- a/docs/resources/Audit_Log.md +++ b/docs/resources/Audit_Log.md @@ -10,11 +10,11 @@ Whenever an admin action is performed on the API, an entry is added to the respe | Field | Type | Description | | ----------------- | ------------------------------------------------------------------------------------ | ---------------------------------------- | -| webhooks | array of [webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object) objects | list of webhooks found in the audit log | -| users | array of [user](#DOCS_RESOURCES_USER/user-object) objects | list of users found in the audit log | | audit_log_entries | array of [audit log entry](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object) objects | list of audit log entries | | integrations | array of partial [integration](#DOCS_RESOURCES_GUILD/integration-object) objects | list of partial integration objects | | threads | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | list of threads found in the audit log\* | +| users | array of [user](#DOCS_RESOURCES_USER/user-object) objects | list of users found in the audit log | +| webhooks | array of [webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object) objects | list of webhooks found in the audit log | \* Threads referenced in THREAD_CREATE and THREAD_UPDATE events are included in the threads map, since archived threads might not be kept in memory by clients. @@ -98,16 +98,15 @@ Whenever an admin action is performed on the API, an entry is added to the respe ###### Optional Audit Entry Info | Field | Type | Description | Action Type | -|--------------------|-----------|-----------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------| -| delete_member_days | string | number of days after which inactive members were kicked | MEMBER_PRUNE | -| members_removed | string | number of members removed by the prune | MEMBER_PRUNE | +| ------------------ | --------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | channel_id | snowflake | channel in which the entities were targeted | MEMBER_MOVE & MESSAGE_PIN & MESSAGE_UNPIN & MESSAGE_DELETE & STAGE_INSTANCE_CREATE & STAGE_INSTANCE_UPDATE & STAGE_INSTANCE_DELETE | -| message_id | snowflake | id of the message that was targeted | MESSAGE_PIN & MESSAGE_UNPIN | | count | string | number of entities that were targeted | MESSAGE_DELETE & MESSAGE_BULK_DELETE & MEMBER_DISCONNECT & MEMBER_MOVE | +| delete_member_days | string | number of days after which inactive members were kicked | MEMBER_PRUNE | | id | snowflake | id of the overwritten entity | CHANNEL_OVERWRITE_CREATE & CHANNEL_OVERWRITE_UPDATE & CHANNEL_OVERWRITE_DELETE | -| type | string | type of overwritten entity - "0" for "role" or "1" for "member" | CHANNEL_OVERWRITE_CREATE & CHANNEL_OVERWRITE_UPDATE & CHANNEL_OVERWRITE_DELETE | +| members_removed | string | number of members removed by the prune | MEMBER_PRUNE | +| message_id | snowflake | id of the message that was targeted | MESSAGE_PIN & MESSAGE_UNPIN | | role_name | string | name of the role if type is "0" (not present if type is "1") | CHANNEL_OVERWRITE_CREATE & CHANNEL_OVERWRITE_UPDATE & CHANNEL_OVERWRITE_DELETE | - +| type | string | type of overwritten entity - "0" for "role" or "1" for "member" | CHANNEL_OVERWRITE_CREATE & CHANNEL_OVERWRITE_UPDATE & CHANNEL_OVERWRITE_DELETE | ### Audit Log Change Object ###### Audit Log Change Structure @@ -124,71 +123,72 @@ Whenever an admin action is performed on the API, an entry is added to the respe ###### Audit Log Change Key | Name | Object Changed | Type | Description | -|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------- |---------------------------------------------------------------------------------------------------------------------------------------------------------| -| name | any | string | name changed | -| description | [guild](#DOCS_RESOURCES_GUILD/guild-object) or [sticker](#DOCS_RESOURCES_STICKER/sticker-object) | string | description changed | -| icon_hash | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | icon changed | -| splash_hash | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | invite splash page artwork changed | -| discovery_splash_hash | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | discovery splash changed | -| banner_hash | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | guild banner changed | -| owner_id | [guild](#DOCS_RESOURCES_GUILD/guild-object) | snowflake | owner changed | -| region | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | region changed | -| preferred_locale | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | preferred locale changed | +| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------- |------------------------------------------------------------------------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------- | | afk_channel_id | [guild](#DOCS_RESOURCES_GUILD/guild-object) | snowflake | afk channel changed | | afk_timeout | [guild](#DOCS_RESOURCES_GUILD/guild-object) | integer | afk timeout duration changed | -| rules_channel_id | [guild](#DOCS_RESOURCES_GUILD/guild-object) | snowflake | id of the rules channel changed | -| public_updates_channel_id | [guild](#DOCS_RESOURCES_GUILD/guild-object) | snowflake | id of the public updates channel changed | -| mfa_level | [guild](#DOCS_RESOURCES_GUILD/guild-object) | integer | two-factor auth requirement changed | -| verification_level | [guild](#DOCS_RESOURCES_GUILD/guild-object) | integer | required verification level changed | -| explicit_content_filter | [guild](#DOCS_RESOURCES_GUILD/guild-object) | integer | change in [whose messages](#DOCS_RESOURCES_GUILD/guild-object-explicit-content-filter-level) are scanned and deleted for explicit content in the server | -| default_message_notifications | [guild](#DOCS_RESOURCES_GUILD/guild-object) | integer | default [message notification level](#DOCS_RESOURCES_GUILD/guild-object-default-message-notification-level) changed | -| vanity_url_code | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | guild invite vanity url changed | -| \$add | [guild](#DOCS_RESOURCES_GUILD/guild-object) | array of partial [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects | new role added | -| \$remove | [guild](#DOCS_RESOURCES_GUILD/guild-object) | array of partial [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects | role removed | -| prune_delete_days | [guild](#DOCS_RESOURCES_GUILD/guild-object) | integer | change in number of days after which inactive and role-unassigned members are kicked | -| widget_enabled | [guild](#DOCS_RESOURCES_GUILD/guild-object) | boolean | server widget enabled/disable | -| widget_channel_id | [guild](#DOCS_RESOURCES_GUILD/guild-object) | snowflake | channel id of the server widget changed | -| system_channel_id | [guild](#DOCS_RESOURCES_GUILD/guild-object) | snowflake | id of the system channel changed | -| position | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | integer | text or voice channel position changed | -| topic | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) or [stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) | string | text channel topic or stage instance topic changed | -| bitrate | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | integer | voice channel bitrate changed | -| permission_overwrites | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | array of [channel overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) objects | permissions on a channel changed | -| nsfw | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | boolean | channel nsfw restriction changed | -| application_id | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | snowflake | application id of the added or removed webhook or bot | -| rate_limit_per_user | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | integer | amount of seconds a user has to wait before sending another message changed | -| permissions | [role](#DOCS_RESOURCES_GUILD/role-object) | string | [permissions](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags) for a role changed | -| color | [role](#DOCS_TOPICS_PERMISSIONS/role-object) | integer | role color changed | -| hoist | [role](#DOCS_TOPICS_PERMISSIONS/role-object) | boolean | role is now displayed/no longer displayed separate from online users | -| mentionable | [role](#DOCS_TOPICS_PERMISSIONS/role-object) | boolean | role is now mentionable/unmentionable | | allow | [role](#DOCS_TOPICS_PERMISSIONS/role-object) | string | a permission on a text or voice channel was allowed for a role | -| deny | [role](#DOCS_TOPICS_PERMISSIONS/role-object) | string | a permission on a text or voice channel was denied for a role | -| code | [invite](#DOCS_RESOURCES_INVITE/invite-object) | string | invite code changed | +| application_id | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | snowflake | application id of the added or removed webhook or bot | +| archived | [thread](#DOCS_RESOURCES_CHANNEL/thread-metadata-object) | bool | thread is now archived/unarchived | +| asset | [sticker](#DOCS_RESOURCES_STICKER/sticker-object) | string | empty string | +| auto_archive_duration | [thread](#DOCS_RESOURCES_CHANNEL/thread-metadata-object) | integer | auto archive duration changed | +| available | [sticker](#DOCS_RESOURCES_STICKER/sticker-object) | boolean | availability of sticker changed | +| avatar_hash | [user](#DOCS_RESOURCES_USER/user-object) | string | user avatar changed | +| banner_hash | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | guild banner changed | +| bitrate | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | integer | voice channel bitrate changed | | channel_id | [invite](#DOCS_RESOURCES_INVITE/invite-channel-object) | snowflake | channel for invite code changed | -| inviter_id | [invite](#DOCS_RESOURCES_INVITE/invite-metadata-object) | snowflake | person who created invite code changed | -| max_uses | [invite](#DOCS_RESOURCES_INVITE/invite-metadata-object) | integer | change to max number of times invite code can be used | -| uses | [invite](#DOCS_RESOURCES_INVITE/invite-metadata-object) | integer | number of times invite code used changed | -| max_age | [invite](#DOCS_RESOURCES_INVITE/invite-metadata-object) | integer | how long invite code lasts changed | -| temporary | [invite](#DOCS_RESOURCES_INVITE/invite-metadata-object) | boolean | invite code is temporary/never expires | +| code | [invite](#DOCS_RESOURCES_INVITE/invite-object) | string | invite code changed | +| color | [role](#DOCS_TOPICS_PERMISSIONS/role-object) | integer | role color changed | | deaf | [user](#DOCS_RESOURCES_USER/user-object) | boolean | user server deafened/undeafened | -| mute | [user](#DOCS_RESOURCES_USER/user-object) | boolean | user server muted/unmuted | -| nick | [user](#DOCS_RESOURCES_USER/user-object) | string | user nickname changed | -| avatar_hash | [user](#DOCS_RESOURCES_USER/user-object) | string | user avatar changed | -| id | any | snowflake | the id of the changed entity - sometimes used in conjunction with other keys | -| type | any | integer or string | type of entity created | +| default_auto_archive_duration | [channel](#DOCS_RESOURCES_CHANNEL/channel) | integer | default auto archive duration for newly created threads changed | +| default_message_notifications | [guild](#DOCS_RESOURCES_GUILD/guild-object) | integer | default [message notification level](#DOCS_RESOURCES_GUILD/guild-object-default-message-notification-level) changed | +| deny | [role](#DOCS_TOPICS_PERMISSIONS/role-object) | string | a permission on a text or voice channel was denied for a role | +| description | [guild](#DOCS_RESOURCES_GUILD/guild-object) or [sticker](#DOCS_RESOURCES_STICKER/sticker-object) | string | description changed | +| discovery_splash_hash | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | discovery splash changed | | enable_emoticons | [integration](#DOCS_RESOURCES_GUILD/integration-object) | boolean | integration emoticons enabled/disabled | | expire_behavior | [integration](#DOCS_RESOURCES_GUILD/integration-object) | integer | integration expiring subscriber behavior changed | | expire_grace_period | [integration](#DOCS_RESOURCES_GUILD/integration-object) | integer | integration expire grace period changed | -| user_limit | [voice channel](#DOCS_RESOURCES_CHANNEL/channel-object) | integer | new user limit in a voice channel | -| privacy_level | [stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) | integer ([privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/privacy-level)) | privacy level of the stage instance changed | -| tags | [sticker](#DOCS_RESOURCES_STICKER/sticker-object) | string | related emoji of sticker changed | +| explicit_content_filter | [guild](#DOCS_RESOURCES_GUILD/guild-object) | integer | change in [whose messages](#DOCS_RESOURCES_GUILD/guild-object-explicit-content-filter-level) are scanned and deleted for explicit content in the server | | format_type | [sticker](#DOCS_RESOURCES_STICKER/sticker-object) | integer ([format type](#DOCS_RESOURCES_STICKER/sticker-object-sticker-format-types)) | format type of sticker changed | -| asset | [sticker](#DOCS_RESOURCES_STICKER/sticker-object) | string | empty string | -| available | [sticker](#DOCS_RESOURCES_STICKER/sticker-object) | boolean | availability of sticker changed | | guild_id | [sticker](#DOCS_RESOURCES_STICKER/sticker-object) | snowflake | guild sticker is in changed | -| archived | [thread](#DOCS_RESOURCES_CHANNEL/thread-metadata-object) | bool | thread is now archived/unarchived | +| hoist | [role](#DOCS_TOPICS_PERMISSIONS/role-object) | boolean | role is now displayed/no longer displayed separate from online users | +| icon_hash | [guild](#DOCS_RESOURCES_GUILD/guild-object) or [role](#DOCS_TOPICS_PERMISSIONS/role-object) | string | icon changed | +| id | any | snowflake | the id of the changed entity - sometimes used in conjunction with other keys | +| inviter_id | [invite](#DOCS_RESOURCES_INVITE/invite-metadata-object) | snowflake | person who created invite code changed | | locked | [thread](#DOCS_RESOURCES_CHANNEL/thread-metadata-object) | bool | thread is now locked/unlocked | -| auto_archive_duration | [thread](#DOCS_RESOURCES_CHANNEL/thread-metadata-object) | integer | auto archive duration changed | -| default_auto_archive_duration | [channel](#DOCS_RESOURCES_CHANNEL/channel) | integer | default auto archive duration for newly created threads changed | +| max_age | [invite](#DOCS_RESOURCES_INVITE/invite-metadata-object) | integer | how long invite code lasts changed | +| max_uses | [invite](#DOCS_RESOURCES_INVITE/invite-metadata-object) | integer | change to max number of times invite code can be used | +| mentionable | [role](#DOCS_TOPICS_PERMISSIONS/role-object) | boolean | role is now mentionable/unmentionable | +| mfa_level | [guild](#DOCS_RESOURCES_GUILD/guild-object) | integer | two-factor auth requirement changed | +| mute | [user](#DOCS_RESOURCES_USER/user-object) | boolean | user server muted/unmuted | +| name | any | string | name changed | +| nick | [user](#DOCS_RESOURCES_USER/user-object) | string | user nickname changed | +| nsfw | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | boolean | channel nsfw restriction changed | +| owner_id | [guild](#DOCS_RESOURCES_GUILD/guild-object) | snowflake | owner changed | +| permission_overwrites | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | array of [channel overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) objects | permissions on a channel changed | +| permissions | [role](#DOCS_RESOURCES_GUILD/role-object) | string | [permissions](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags) for a role changed | +| position | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | integer | text or voice channel position changed | +| preferred_locale | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | preferred locale changed | +| privacy_level | [stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) | integer ([privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/privacy-level)) | privacy level of the stage instance changed | +| prune_delete_days | [guild](#DOCS_RESOURCES_GUILD/guild-object) | integer | change in number of days after which inactive and role-unassigned members are kicked | +| public_updates_channel_id | [guild](#DOCS_RESOURCES_GUILD/guild-object) | snowflake | id of the public updates channel changed | +| rate_limit_per_user | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) | integer | amount of seconds a user has to wait before sending another message changed | +| region | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | region changed | +| rules_channel_id | [guild](#DOCS_RESOURCES_GUILD/guild-object) | snowflake | id of the rules channel changed | +| splash_hash | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | invite splash page artwork changed | +| system_channel_id | [guild](#DOCS_RESOURCES_GUILD/guild-object) | snowflake | id of the system channel changed | +| tags | [sticker](#DOCS_RESOURCES_STICKER/sticker-object) | string | related emoji of sticker changed | +| temporary | [invite](#DOCS_RESOURCES_INVITE/invite-metadata-object) | boolean | invite code is temporary/never expires | +| topic | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) or [stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) | string | text channel topic or stage instance topic changed | +| type | any | integer or string | type of entity created | +| unicode_emoji | [role](#DOCS_TOPICS_PERMISSIONS/role-object) | string | role unicode emoji changed | +| user_limit | [voice channel](#DOCS_RESOURCES_CHANNEL/channel-object) | integer | new user limit in a voice channel | +| uses | [invite](#DOCS_RESOURCES_INVITE/invite-metadata-object) | integer | number of times invite code used changed | +| vanity_url_code | [guild](#DOCS_RESOURCES_GUILD/guild-object) | string | guild invite vanity url changed | +| verification_level | [guild](#DOCS_RESOURCES_GUILD/guild-object) | integer | required verification level changed | +| widget_channel_id | [guild](#DOCS_RESOURCES_GUILD/guild-object) | snowflake | channel id of the server widget changed | +| widget_enabled | [guild](#DOCS_RESOURCES_GUILD/guild-object) | boolean | server widget enabled/disable | +| \$add | [guild](#DOCS_RESOURCES_GUILD/guild-object) | array of partial [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects | new role added | +| \$remove | [guild](#DOCS_RESOURCES_GUILD/guild-object) | array of partial [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects | role removed | ###### Example Partial Role Object diff --git a/docs/resources/Guild.md b/docs/resources/Guild.md index a22fc67b72..56b6286fe5 100644 --- a/docs/resources/Guild.md +++ b/docs/resources/Guild.md @@ -135,19 +135,20 @@ Guilds in Discord represent an isolated collection of users and channels, and ar | FEATURABLE | guild is able to be featured in the directory | | INVITE_SPLASH | guild has access to set an invite splash background | | MEMBER_VERIFICATION_GATE_ENABLED | guild has enabled [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screening-object) | +| MONETIZATION_ENABLED | guild has enabled monetization | +| MORE_STICKERS | guild has increased custom sticker slots | | NEWS | guild has access to create news channels | | PARTNERED | guild is partnered | | PREVIEW_ENABLED | guild can be previewed before joining via Membership Screening or the directory | +| PRIVATE_THREADS | guild has access to create private threads | +| ROLE_ICONS | guild is able to set role icons | +| SEVEN_DAY_THREAD_ARCHIVE | guild has access to the seven day archive time for threads | +| THREE_DAY_THREAD_ARCHIVE | guild has access to the three day archive time for threads | +| TICKETED_EVENTS_ENABLED | guild has enabled ticketed events | | VANITY_URL | guild has access to set a vanity URL | | 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 | -| TICKETED_EVENTS_ENABLED | guild has enabled ticketed events | -| MONETIZATION_ENABLED | guild has enabled monetization | -| MORE_STICKERS | guild has increased custom sticker slots | -| THREE_DAY_THREAD_ARCHIVE | guild has access to the three day archive time for threads | -| SEVEN_DAY_THREAD_ARCHIVE | guild has access to the seven day archive time for threads | -| PRIVATE_THREADS | guild has access to create private threads | ###### Example Guild @@ -854,13 +855,15 @@ Create a new [role](#DOCS_TOPICS_PERMISSIONS/role-object) for the guild. Require ###### JSON Params -| Field | Type | Description | Default | -| ----------- | ------- | -------------------------------------------------------------- | ------------------------------ | -| name | string | name of the role | "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 | -| mentionable | boolean | whether the role should be mentionable | false | +| Field | Type | Description | Default | +| ------------- | ---------------------------------------- | -------------------------------------------------------------------- | ------------------------------ | +| name | string | name of the role | "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 (if the guild has the `ROLE_ICONS` feature) | null | +| mentionable | boolean | whether the role should be mentionable | false | ## Modify Guild Role Positions % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles @@ -890,13 +893,15 @@ Modify a guild role. Requires the `MANAGE_ROLES` permission. Returns the updated ###### JSON Params -| Field | Type | Description | -| ----------- | ------- | -------------------------------------------------------------- | -| name | string | name of the role | -| 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 | -| mentionable | boolean | whether the role should be mentionable | +| Field | Type | Description | +| ------------- | ---------------------------------------- | -------------------------------------------------------------------- | +| name | string | name of the role | +| 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 (if the guild has the `ROLE_ICONS` feature) | +| mentionable | boolean | whether the role should be mentionable | ## Delete Guild Role % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles/{role.id#DOCS_TOPICS_PERMISSIONS/role-object} diff --git a/docs/topics/Permissions.md b/docs/topics/Permissions.md index fa8eccec63..3af3ee1843 100644 --- a/docs/topics/Permissions.md +++ b/docs/topics/Permissions.md @@ -177,17 +177,19 @@ 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 | -| tags? | [role tags](#DOCS_TOPICS_PERMISSIONS/role-object-role-tags-structure) object | the tags this role has | +| 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 | +| icon | ?string | role [icon hash](#DOCS_REFERENCE/image-formatting)| +| unicode_emoji | ?string | role unicode emoji | +| 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. @@ -207,6 +209,8 @@ Roles without colors (`color == 0`) do not count towards the final computed colo "name": "WE DEM BOYZZ!!!!!!", "color": 3447003, "hoist": true, + "icon": "cf3ced8600b777c9486c6d8d84fb4327", + "unicode_emoji": null, "position": 1, "permissions": "66321471", "managed": false,