Skip to content

Commit

Permalink
feat(APIRole): add role icons (#204)
Browse files Browse the repository at this point in the history
* feat: add role icons

* Apply suggestions from code review

Co-authored-by: Antonio Román <kyradiscord@gmail.com>

* fix: make requested changes

* chore: update descriptions

Co-authored-by: Antonio Román <kyradiscord@gmail.com>
  • Loading branch information
suneettipirneni and kyranet committed Oct 1, 2021
1 parent 0c592a0 commit 1076822
Show file tree
Hide file tree
Showing 12 changed files with 112 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deno/payloads/v8/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,10 @@ export enum GuildFeature {
*/
Partnered = 'PARTNERED',
RelayEnabled = 'RELAY_ENABLED',
/**
* Guild is able to set role icons
*/
RoleIcons = 'ROLE_ICONS',
/**
* Guild has access to set a vanity URL
*/
Expand Down
8 changes: 8 additions & 0 deletions deno/payloads/v8/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ export interface APIRole {
* If this role is pinned in the user listing
*/
hoist: boolean;
/**
* The role icon hash
*/
icon?: string;
/**
* The role unicode emoji as a standard emoji
*/
unicode_emoji?: string;
/**
* Position of this role
*/
Expand Down
4 changes: 4 additions & 0 deletions deno/payloads/v9/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ export enum GuildFeature {
*/
Partnered = 'PARTNERED',
RelayEnabled = 'RELAY_ENABLED',
/**
* Guild is able to set role icons
*/
RoleIcons = 'ROLE_ICONS',
/**
* Guild has access to set a vanity URL
*/
Expand Down
8 changes: 8 additions & 0 deletions deno/payloads/v9/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ export interface APIRole {
* If this role is pinned in the user listing
*/
hoist: boolean;
/**
* The role icon hash
*/
icon?: string;
/**
* The role unicode emoji as a standard emoji
*/
unicode_emoji?: string;
/**
* Position of this role
*/
Expand Down
16 changes: 16 additions & 0 deletions deno/rest/v8/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,14 @@ export interface RESTPostAPIGuildRoleJSONBody {
* @default false
*/
hoist?: boolean | null;
/**
* The role's icon image (if the guild has the `ROLE_ICONS` feature)
*/
icon?: string | null;
/**
* The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
*/
unicode_emoji?: string | null;
/**
* Whether the role should be mentionable
*
Expand Down Expand Up @@ -577,6 +585,14 @@ export interface RESTPatchAPIGuildRoleJSONBody {
* Whether the role should be displayed separately in the sidebar
*/
hoist?: boolean | null;
/**
* The role's icon image (if the guild has the `ROLE_ICONS` feature)
*/
icon?: string | null;
/**
* The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
*/
unicode_emoji?: string | null;
/**
* Whether the role should be mentionable
*/
Expand Down
16 changes: 16 additions & 0 deletions deno/rest/v9/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,14 @@ export interface RESTPostAPIGuildRoleJSONBody {
* @default false
*/
hoist?: boolean | null;
/**
* The role's icon image (if the guild has the `ROLE_ICONS` feature)
*/
icon?: string | null;
/**
* The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
*/
unicode_emoji?: string | null;
/**
* Whether the role should be mentionable
*
Expand Down Expand Up @@ -583,6 +591,14 @@ export interface RESTPatchAPIGuildRoleJSONBody {
* Whether the role should be displayed separately in the sidebar
*/
hoist?: boolean | null;
/**
* The role's icon image (if the guild has the `ROLE_ICONS` feature)
*/
icon?: string | null;
/**
* The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
*/
unicode_emoji?: string | null;
/**
* Whether the role should be mentionable
*/
Expand Down
4 changes: 4 additions & 0 deletions payloads/v8/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,10 @@ export const enum GuildFeature {
*/
Partnered = 'PARTNERED',
RelayEnabled = 'RELAY_ENABLED',
/**
* Guild is able to set role icons
*/
RoleIcons = 'ROLE_ICONS',
/**
* Guild has access to set a vanity URL
*/
Expand Down
8 changes: 8 additions & 0 deletions payloads/v8/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ export interface APIRole {
* If this role is pinned in the user listing
*/
hoist: boolean;
/**
* The role icon hash
*/
icon?: string;
/**
* The role unicode emoji as a standard emoji
*/
unicode_emoji?: string;
/**
* Position of this role
*/
Expand Down
4 changes: 4 additions & 0 deletions payloads/v9/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ export const enum GuildFeature {
*/
Partnered = 'PARTNERED',
RelayEnabled = 'RELAY_ENABLED',
/**
* Guild is able to set role icons
*/
RoleIcons = 'ROLE_ICONS',
/**
* Guild has access to set a vanity URL
*/
Expand Down
8 changes: 8 additions & 0 deletions payloads/v9/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ export interface APIRole {
* If this role is pinned in the user listing
*/
hoist: boolean;
/**
* The role icon hash
*/
icon?: string;
/**
* The role unicode emoji as a standard emoji
*/
unicode_emoji?: string;
/**
* Position of this role
*/
Expand Down
16 changes: 16 additions & 0 deletions rest/v8/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,14 @@ export interface RESTPostAPIGuildRoleJSONBody {
* @default false
*/
hoist?: boolean | null;
/**
* The role's icon image (if the guild has the `ROLE_ICONS` feature)
*/
icon?: string | null;
/**
* The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
*/
unicode_emoji?: string | null;
/**
* Whether the role should be mentionable
*
Expand Down Expand Up @@ -577,6 +585,14 @@ export interface RESTPatchAPIGuildRoleJSONBody {
* Whether the role should be displayed separately in the sidebar
*/
hoist?: boolean | null;
/**
* The role's icon image (if the guild has the `ROLE_ICONS` feature)
*/
icon?: string | null;
/**
* The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
*/
unicode_emoji?: string | null;
/**
* Whether the role should be mentionable
*/
Expand Down
16 changes: 16 additions & 0 deletions rest/v9/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,14 @@ export interface RESTPostAPIGuildRoleJSONBody {
* @default false
*/
hoist?: boolean | null;
/**
* The role's icon image (if the guild has the `ROLE_ICONS` feature)
*/
icon?: string | null;
/**
* The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
*/
unicode_emoji?: string | null;
/**
* Whether the role should be mentionable
*
Expand Down Expand Up @@ -583,6 +591,14 @@ export interface RESTPatchAPIGuildRoleJSONBody {
* Whether the role should be displayed separately in the sidebar
*/
hoist?: boolean | null;
/**
* The role's icon image (if the guild has the `ROLE_ICONS` feature)
*/
icon?: string | null;
/**
* The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
*/
unicode_emoji?: string | null;
/**
* Whether the role should be mentionable
*/
Expand Down

0 comments on commit 1076822

Please sign in to comment.