diff --git a/transformers/interaction.ts b/transformers/interaction.ts index 64c930121..8b2c98173 100644 --- a/transformers/interaction.ts +++ b/transformers/interaction.ts @@ -25,6 +25,8 @@ export function transformInteraction(bot: Bot, payload: SnakeCasedPropertiesDeep type: payload.type, token: payload.token, version: payload.version, + locale: payload.locale, + guildLocale: payload.guild_locale, // TRANSFORMED STUFF BELOW guildId, @@ -198,4 +200,9 @@ export interface DiscordenoInteraction { /** The target id if this is a context menu command. */ targetId?: bigint; }; + + /** The selected language of the invoking user */ + locale?: string; + /** The guild's preferred locale, if invoked in a guild. WARNING HIGHLY INACCURATE IN MOST SERVERS! */ + guildLocale?: string; } diff --git a/types/interactions/interaction.ts b/types/interactions/interaction.ts index 727c09556..a89c57d17 100644 --- a/types/interactions/interaction.ts +++ b/types/interactions/interaction.ts @@ -27,4 +27,9 @@ export interface Interaction { message?: Message; data?: InteractionData; + + /** The selected language of the invoking user */ + locale?: string; + /** The guild's preferred locale, if invoked in a guild */ + guildLocale?: string; }