mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
Add locale fields to interaction structure (#2042)
* Add locale fields to interaction structure * making locale and guildLocale optional and add a warning to guildLocale Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
This commit is contained in:
co-authored by
Skillz4Killz
parent
be7833a184
commit
3c10622d69
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user