mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-28 06:20:11 +00:00
feat(APIInteraction): add locale props to interactions (#273)
Reference: https://github.com/discord/discord-api-docs/pull/4265
This commit is contained in:
@@ -86,6 +86,14 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* For components, the message they were attached to
|
||||
*/
|
||||
message?: APIMessage;
|
||||
/**
|
||||
* The selected language of the invoking user
|
||||
*/
|
||||
locale: string;
|
||||
/**
|
||||
* The guild's preferred locale, if invoked in a guild
|
||||
*/
|
||||
guild_locale?: string;
|
||||
}
|
||||
|
||||
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { APIBaseInteraction } from './base.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
|
||||
export type APIPingInteraction = APIBaseInteraction<InteractionType.Ping, never>;
|
||||
export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>;
|
||||
|
||||
@@ -86,6 +86,14 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* For components, the message they were attached to
|
||||
*/
|
||||
message?: APIMessage;
|
||||
/**
|
||||
* The selected language of the invoking user
|
||||
*/
|
||||
locale: string;
|
||||
/**
|
||||
* The guild's preferred locale, if invoked in a guild
|
||||
*/
|
||||
guild_locale?: string;
|
||||
}
|
||||
|
||||
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { APIBaseInteraction } from './base.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
|
||||
export type APIPingInteraction = APIBaseInteraction<InteractionType.Ping, never>;
|
||||
export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>;
|
||||
|
||||
@@ -86,6 +86,14 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* For components, the message they were attached to
|
||||
*/
|
||||
message?: APIMessage;
|
||||
/**
|
||||
* The selected language of the invoking user
|
||||
*/
|
||||
locale: string;
|
||||
/**
|
||||
* The guild's preferred locale, if invoked in a guild
|
||||
*/
|
||||
guild_locale?: string;
|
||||
}
|
||||
|
||||
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { APIBaseInteraction } from './base';
|
||||
import type { InteractionType } from './responses';
|
||||
|
||||
export type APIPingInteraction = APIBaseInteraction<InteractionType.Ping, never>;
|
||||
export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>;
|
||||
|
||||
@@ -86,6 +86,14 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* For components, the message they were attached to
|
||||
*/
|
||||
message?: APIMessage;
|
||||
/**
|
||||
* The selected language of the invoking user
|
||||
*/
|
||||
locale: string;
|
||||
/**
|
||||
* The guild's preferred locale, if invoked in a guild
|
||||
*/
|
||||
guild_locale?: string;
|
||||
}
|
||||
|
||||
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { APIBaseInteraction } from './base';
|
||||
import type { InteractionType } from './responses';
|
||||
|
||||
export type APIPingInteraction = APIBaseInteraction<InteractionType.Ping, never>;
|
||||
export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>;
|
||||
|
||||
Reference in New Issue
Block a user