mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-21 10:50:08 +00:00
feat: Specific typings for application emojis (#1228)
This commit is contained in:
31
deno/payloads/v10/emoji.ts
generated
31
deno/payloads/v10/emoji.ts
generated
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { _NonNullableFields } from '../../utils/internals.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
@@ -49,3 +50,33 @@ export interface APIEmoji extends APIPartialEmoji {
|
||||
*/
|
||||
available?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-applicationowned-emoji}
|
||||
*/
|
||||
export type APIApplicationEmoji = _NonNullableFields<Required<Pick<APIEmoji, 'animated' | 'id' | 'name' | 'user'>>> & {
|
||||
/**
|
||||
* Roles allowed to use this emoji.
|
||||
*
|
||||
* @remarks Always empty.
|
||||
*/
|
||||
roles: [];
|
||||
/**
|
||||
* Whether this emoji must be wrapped in colons.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
require_colons: true;
|
||||
/**
|
||||
* Whether this emoji is managed.
|
||||
*
|
||||
* @remarks Always `false`.
|
||||
*/
|
||||
managed: false;
|
||||
/**
|
||||
* Whether this emoji is available.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
available: true;
|
||||
};
|
||||
|
||||
31
deno/payloads/v9/emoji.ts
generated
31
deno/payloads/v9/emoji.ts
generated
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { _NonNullableFields } from '../../utils/internals.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
@@ -49,3 +50,33 @@ export interface APIEmoji extends APIPartialEmoji {
|
||||
*/
|
||||
available?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-applicationowned-emoji}
|
||||
*/
|
||||
export type APIApplicationEmoji = _NonNullableFields<Required<Pick<APIEmoji, 'animated' | 'id' | 'name' | 'user'>>> & {
|
||||
/**
|
||||
* Roles allowed to use this emoji.
|
||||
*
|
||||
* @remarks Always empty.
|
||||
*/
|
||||
roles: [];
|
||||
/**
|
||||
* Whether this emoji must be wrapped in colons.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
require_colons: true;
|
||||
/**
|
||||
* Whether this emoji is managed.
|
||||
*
|
||||
* @remarks Always `false`.
|
||||
*/
|
||||
managed: false;
|
||||
/**
|
||||
* Whether this emoji is available.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
available: true;
|
||||
};
|
||||
|
||||
10
deno/rest/v10/emoji.ts
generated
10
deno/rest/v10/emoji.ts
generated
@@ -1,5 +1,5 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIEmoji } from '../../payloads/v10/mod.ts';
|
||||
import type { APIApplicationEmoji, APIEmoji } from '../../payloads/v10.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
|
||||
@@ -64,13 +64,13 @@ export type RESTDeleteAPIGuildEmojiResult = never;
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#list-application-emojis}
|
||||
*/
|
||||
export interface RESTGetAPIApplicationEmojisResult {
|
||||
items: APIEmoji[];
|
||||
items: APIApplicationEmoji[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#get-application-emoji}
|
||||
*/
|
||||
export type RESTGetAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTGetAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji-json-params}
|
||||
@@ -80,7 +80,7 @@ export type RESTPostAPIApplicationEmojiJSONBody = Pick<RESTPostAPIGuildEmojiJSON
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji}
|
||||
*/
|
||||
export type RESTPostAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTPostAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
|
||||
@@ -90,7 +90,7 @@ export type RESTPatchAPIApplicationEmojiJSONBody = Pick<RESTPatchAPIGuildEmojiJS
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
|
||||
*/
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#delete-application-emoji}
|
||||
|
||||
10
deno/rest/v9/emoji.ts
generated
10
deno/rest/v9/emoji.ts
generated
@@ -1,5 +1,5 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIEmoji } from '../../payloads/v9/mod.ts';
|
||||
import type { APIApplicationEmoji, APIEmoji } from '../../payloads/v9.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
|
||||
@@ -64,13 +64,13 @@ export type RESTDeleteAPIGuildEmojiResult = never;
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#list-application-emojis}
|
||||
*/
|
||||
export interface RESTGetAPIApplicationEmojisResult {
|
||||
items: APIEmoji[];
|
||||
items: APIApplicationEmoji[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#get-application-emoji}
|
||||
*/
|
||||
export type RESTGetAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTGetAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji-json-params}
|
||||
@@ -80,7 +80,7 @@ export type RESTPostAPIApplicationEmojiJSONBody = Pick<RESTPostAPIGuildEmojiJSON
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji}
|
||||
*/
|
||||
export type RESTPostAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTPostAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
|
||||
@@ -90,7 +90,7 @@ export type RESTPatchAPIApplicationEmojiJSONBody = Pick<RESTPatchAPIGuildEmojiJS
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
|
||||
*/
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#delete-application-emoji}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { _NonNullableFields } from '../../utils/internals';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APIUser } from './user';
|
||||
|
||||
@@ -49,3 +50,33 @@ export interface APIEmoji extends APIPartialEmoji {
|
||||
*/
|
||||
available?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-applicationowned-emoji}
|
||||
*/
|
||||
export type APIApplicationEmoji = _NonNullableFields<Required<Pick<APIEmoji, 'animated' | 'id' | 'name' | 'user'>>> & {
|
||||
/**
|
||||
* Roles allowed to use this emoji.
|
||||
*
|
||||
* @remarks Always empty.
|
||||
*/
|
||||
roles: [];
|
||||
/**
|
||||
* Whether this emoji must be wrapped in colons.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
require_colons: true;
|
||||
/**
|
||||
* Whether this emoji is managed.
|
||||
*
|
||||
* @remarks Always `false`.
|
||||
*/
|
||||
managed: false;
|
||||
/**
|
||||
* Whether this emoji is available.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
available: true;
|
||||
};
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { _NonNullableFields } from '../../utils/internals';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APIUser } from './user';
|
||||
|
||||
@@ -49,3 +50,33 @@ export interface APIEmoji extends APIPartialEmoji {
|
||||
*/
|
||||
available?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-applicationowned-emoji}
|
||||
*/
|
||||
export type APIApplicationEmoji = _NonNullableFields<Required<Pick<APIEmoji, 'animated' | 'id' | 'name' | 'user'>>> & {
|
||||
/**
|
||||
* Roles allowed to use this emoji.
|
||||
*
|
||||
* @remarks Always empty.
|
||||
*/
|
||||
roles: [];
|
||||
/**
|
||||
* Whether this emoji must be wrapped in colons.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
require_colons: true;
|
||||
/**
|
||||
* Whether this emoji is managed.
|
||||
*
|
||||
* @remarks Always `false`.
|
||||
*/
|
||||
managed: false;
|
||||
/**
|
||||
* Whether this emoji is available.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
available: true;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { APIEmoji } from '../../payloads/v10/index';
|
||||
import type { APIApplicationEmoji, APIEmoji } from '../../payloads/v10';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
|
||||
@@ -64,13 +64,13 @@ export type RESTDeleteAPIGuildEmojiResult = never;
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#list-application-emojis}
|
||||
*/
|
||||
export interface RESTGetAPIApplicationEmojisResult {
|
||||
items: APIEmoji[];
|
||||
items: APIApplicationEmoji[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#get-application-emoji}
|
||||
*/
|
||||
export type RESTGetAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTGetAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji-json-params}
|
||||
@@ -80,7 +80,7 @@ export type RESTPostAPIApplicationEmojiJSONBody = Pick<RESTPostAPIGuildEmojiJSON
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji}
|
||||
*/
|
||||
export type RESTPostAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTPostAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
|
||||
@@ -90,7 +90,7 @@ export type RESTPatchAPIApplicationEmojiJSONBody = Pick<RESTPatchAPIGuildEmojiJS
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
|
||||
*/
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#delete-application-emoji}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { APIEmoji } from '../../payloads/v9/index';
|
||||
import type { APIApplicationEmoji, APIEmoji } from '../../payloads/v9';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
|
||||
@@ -64,13 +64,13 @@ export type RESTDeleteAPIGuildEmojiResult = never;
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#list-application-emojis}
|
||||
*/
|
||||
export interface RESTGetAPIApplicationEmojisResult {
|
||||
items: APIEmoji[];
|
||||
items: APIApplicationEmoji[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#get-application-emoji}
|
||||
*/
|
||||
export type RESTGetAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTGetAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji-json-params}
|
||||
@@ -80,7 +80,7 @@ export type RESTPostAPIApplicationEmojiJSONBody = Pick<RESTPostAPIGuildEmojiJSON
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji}
|
||||
*/
|
||||
export type RESTPostAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTPostAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
|
||||
@@ -90,7 +90,7 @@ export type RESTPatchAPIApplicationEmojiJSONBody = Pick<RESTPatchAPIGuildEmojiJS
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
|
||||
*/
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#delete-application-emoji}
|
||||
|
||||
Reference in New Issue
Block a user