Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(APIApplicationCommand): add missing localization props #383

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion deno/payloads/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>>;
8 changes: 8 additions & 0 deletions deno/payloads/v10/_interactions/applicationCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export interface APIApplicationCommand {
* Localization dictionary for the name field. Values follow the same restrictions as name
*/
name_localizations?: LocalizationMap;
/**
* The localized description
suneettipirneni marked this conversation as resolved.
Show resolved Hide resolved
*/
name_localized?: string;
/**
* 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
*/
Expand All @@ -58,6 +62,10 @@ export interface APIApplicationCommand {
* Localization dictionary for the description field. Values follow the same restrictions as description
*/
description_localizations?: LocalizationMap;
/**
* The localized description
*/
description_localized?: string;
/**
* The parameters for the `CHAT_INPUT` command, max 25
*/
Expand Down
8 changes: 8 additions & 0 deletions deno/payloads/v9/_interactions/applicationCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export interface APIApplicationCommand {
* Localization dictionary for the name field. Values follow the same restrictions as name
*/
name_localizations?: LocalizationMap;
/**
* The localized description
*/
name_localized?: string;
/**
* 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
*/
Expand All @@ -58,6 +62,10 @@ export interface APIApplicationCommand {
* Localization dictionary for the description field. Values follow the same restrictions as description
*/
description_localizations?: LocalizationMap;
/**
* The localized description
*/
description_localized?: string;
/**
* The parameters for the `CHAT_INPUT` command, max 25
*/
Expand Down
12 changes: 11 additions & 1 deletion deno/rest/v10/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
>
>;

/**
Expand Down
12 changes: 11 additions & 1 deletion deno/rest/v9/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
>
>;

/**
Expand Down
2 changes: 1 addition & 1 deletion payloads/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>>;
8 changes: 8 additions & 0 deletions payloads/v10/_interactions/applicationCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export interface APIApplicationCommand {
* Localization dictionary for the name field. Values follow the same restrictions as name
*/
name_localizations?: LocalizationMap;
/**
* The localized description
*/
name_localized?: string;
/**
* 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
*/
Expand All @@ -58,6 +62,10 @@ export interface APIApplicationCommand {
* Localization dictionary for the description field. Values follow the same restrictions as description
*/
description_localizations?: LocalizationMap;
/**
* The localized description
*/
description_localized?: string;
/**
* The parameters for the `CHAT_INPUT` command, max 25
*/
Expand Down
8 changes: 8 additions & 0 deletions payloads/v9/_interactions/applicationCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export interface APIApplicationCommand {
* Localization dictionary for the name field. Values follow the same restrictions as name
*/
name_localizations?: LocalizationMap;
/**
* The localized description
*/
name_localized?: string;
/**
* 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
*/
Expand All @@ -58,6 +62,10 @@ export interface APIApplicationCommand {
* Localization dictionary for the description field. Values follow the same restrictions as description
*/
description_localizations?: LocalizationMap;
/**
* The localized description
*/
description_localized?: string;
/**
* The parameters for the `CHAT_INPUT` command, max 25
*/
Expand Down
12 changes: 11 additions & 1 deletion rest/v10/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
>
>;

/**
Expand Down
12 changes: 11 additions & 1 deletion rest/v9/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
>
>;

/**
Expand Down