feat(APIRole): add role icons (#204)

* 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>
This commit is contained in:
Suneet Tipirneni
2021-10-01 02:29:47 -04:00
committed by GitHub
parent 0c592a0950
commit 1076822b90
12 changed files with 112 additions and 0 deletions

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*
@@ -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
*/

View File

@@ -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
*
@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*
@@ -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
*/

View File

@@ -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
*
@@ -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
*/