mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-06-03 09:20:10 +00:00
feat(APIApplicationCommand): add missing localization props (#383)
This commit is contained in:
@@ -57,4 +57,4 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
Object.freeze(PermissionFlagsBits);
|
||||
|
||||
export type LocalizationMap = Partial<Record<LocaleString, string>>;
|
||||
export type LocalizationMap = Partial<Record<LocaleString, string | null>>;
|
||||
|
||||
@@ -50,6 +50,10 @@ export interface APIApplicationCommand {
|
||||
* Localization dictionary for the name field. Values follow the same restrictions as name
|
||||
*/
|
||||
name_localizations?: LocalizationMap | null;
|
||||
/**
|
||||
* The localized name
|
||||
*/
|
||||
name_localized?: string;
|
||||
/**
|
||||
* 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
|
||||
*/
|
||||
@@ -58,6 +62,10 @@ export interface APIApplicationCommand {
|
||||
* Localization dictionary for the description field. Values follow the same restrictions as description
|
||||
*/
|
||||
description_localizations?: LocalizationMap | null;
|
||||
/**
|
||||
* The localized description
|
||||
*/
|
||||
description_localized?: string;
|
||||
/**
|
||||
* The parameters for the `CHAT_INPUT` command, max 25
|
||||
*/
|
||||
|
||||
@@ -50,6 +50,10 @@ export interface APIApplicationCommand {
|
||||
* Localization dictionary for the name field. Values follow the same restrictions as name
|
||||
*/
|
||||
name_localizations?: LocalizationMap | null;
|
||||
/**
|
||||
* The localized name
|
||||
*/
|
||||
name_localized?: string;
|
||||
/**
|
||||
* 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
|
||||
*/
|
||||
@@ -58,6 +62,10 @@ export interface APIApplicationCommand {
|
||||
* Localization dictionary for the description field. Values follow the same restrictions as description
|
||||
*/
|
||||
description_localizations?: LocalizationMap | null;
|
||||
/**
|
||||
* The localized description
|
||||
*/
|
||||
description_localized?: string;
|
||||
/**
|
||||
* The parameters for the `CHAT_INPUT` command, max 25
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,17 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
|
||||
export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
|
||||
|
||||
type RESTPostAPIBaseApplicationCommandsJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Omit<APIApplicationCommand, 'id' | 'application_id' | 'description' | 'type' | 'version' | 'guild_id'>
|
||||
Omit<
|
||||
APIApplicationCommand,
|
||||
| 'id'
|
||||
| 'application_id'
|
||||
| 'description'
|
||||
| 'type'
|
||||
| 'version'
|
||||
| 'guild_id'
|
||||
| 'name_localized'
|
||||
| 'description_localized'
|
||||
>
|
||||
>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,17 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
|
||||
export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
|
||||
|
||||
type RESTPostAPIBaseApplicationCommandsJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Omit<APIApplicationCommand, 'id' | 'application_id' | 'description' | 'type' | 'version' | 'guild_id'>
|
||||
Omit<
|
||||
APIApplicationCommand,
|
||||
| 'id'
|
||||
| 'application_id'
|
||||
| 'description'
|
||||
| 'type'
|
||||
| 'version'
|
||||
| 'guild_id'
|
||||
| 'name_localized'
|
||||
| 'description_localized'
|
||||
>
|
||||
>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,4 +57,4 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
Object.freeze(PermissionFlagsBits);
|
||||
|
||||
export type LocalizationMap = Partial<Record<LocaleString, string>>;
|
||||
export type LocalizationMap = Partial<Record<LocaleString, string | null>>;
|
||||
|
||||
@@ -50,6 +50,10 @@ export interface APIApplicationCommand {
|
||||
* Localization dictionary for the name field. Values follow the same restrictions as name
|
||||
*/
|
||||
name_localizations?: LocalizationMap | null;
|
||||
/**
|
||||
* The localized name
|
||||
*/
|
||||
name_localized?: string;
|
||||
/**
|
||||
* 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
|
||||
*/
|
||||
@@ -58,6 +62,10 @@ export interface APIApplicationCommand {
|
||||
* Localization dictionary for the description field. Values follow the same restrictions as description
|
||||
*/
|
||||
description_localizations?: LocalizationMap | null;
|
||||
/**
|
||||
* The localized description
|
||||
*/
|
||||
description_localized?: string;
|
||||
/**
|
||||
* The parameters for the `CHAT_INPUT` command, max 25
|
||||
*/
|
||||
|
||||
@@ -50,6 +50,10 @@ export interface APIApplicationCommand {
|
||||
* Localization dictionary for the name field. Values follow the same restrictions as name
|
||||
*/
|
||||
name_localizations?: LocalizationMap | null;
|
||||
/**
|
||||
* The localized name
|
||||
*/
|
||||
name_localized?: string;
|
||||
/**
|
||||
* 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
|
||||
*/
|
||||
@@ -58,6 +62,10 @@ export interface APIApplicationCommand {
|
||||
* Localization dictionary for the description field. Values follow the same restrictions as description
|
||||
*/
|
||||
description_localizations?: LocalizationMap | null;
|
||||
/**
|
||||
* The localized description
|
||||
*/
|
||||
description_localized?: string;
|
||||
/**
|
||||
* The parameters for the `CHAT_INPUT` command, max 25
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,17 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
|
||||
export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
|
||||
|
||||
type RESTPostAPIBaseApplicationCommandsJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Omit<APIApplicationCommand, 'id' | 'application_id' | 'description' | 'type' | 'version' | 'guild_id'>
|
||||
Omit<
|
||||
APIApplicationCommand,
|
||||
| 'id'
|
||||
| 'application_id'
|
||||
| 'description'
|
||||
| 'type'
|
||||
| 'version'
|
||||
| 'guild_id'
|
||||
| 'name_localized'
|
||||
| 'description_localized'
|
||||
>
|
||||
>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,17 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
|
||||
export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
|
||||
|
||||
type RESTPostAPIBaseApplicationCommandsJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Omit<APIApplicationCommand, 'id' | 'application_id' | 'description' | 'type' | 'version' | 'guild_id'>
|
||||
Omit<
|
||||
APIApplicationCommand,
|
||||
| 'id'
|
||||
| 'application_id'
|
||||
| 'description'
|
||||
| 'type'
|
||||
| 'version'
|
||||
| 'guild_id'
|
||||
| 'name_localized'
|
||||
| 'description_localized'
|
||||
>
|
||||
>;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user