mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
docs: fix and improve localization docs (v13 backport) (#7807)
This commit is contained in:
@@ -76,15 +76,50 @@ class Interaction extends Base {
|
||||
this.memberPermissions = data.member?.permissions ? new Permissions(data.member.permissions).freeze() : null;
|
||||
|
||||
/**
|
||||
* The locale of the user who invoked this interaction
|
||||
* @type {string}
|
||||
* A Discord locale string, possible values are:
|
||||
* * en-US (English, US)
|
||||
* * en-GB (English, UK)
|
||||
* * bg (Bulgarian)
|
||||
* * zh-CN (Chinese, China)
|
||||
* * zh-TW (Chinese, Taiwan)
|
||||
* * hr (Croatian)
|
||||
* * cs (Czech)
|
||||
* * da (Danish)
|
||||
* * nl (Dutch)
|
||||
* * fi (Finnish)
|
||||
* * fr (French)
|
||||
* * de (German)
|
||||
* * el (Greek)
|
||||
* * hi (Hindi)
|
||||
* * hu (Hungarian)
|
||||
* * it (Italian)
|
||||
* * ja (Japanese)
|
||||
* * ko (Korean)
|
||||
* * lt (Lithuanian)
|
||||
* * no (Norwegian)
|
||||
* * pl (Polish)
|
||||
* * pt-BR (Portuguese, Brazilian)
|
||||
* * ro (Romanian, Romania)
|
||||
* * ru (Russian)
|
||||
* * es-ES (Spanish)
|
||||
* * sv-SE (Swedish)
|
||||
* * th (Thai)
|
||||
* * tr (Turkish)
|
||||
* * uk (Ukrainian)
|
||||
* * vi (Vietnamese)
|
||||
* @see {@link https://discord.com/developers/docs/reference#locales}
|
||||
* @typedef {string} Locale
|
||||
*/
|
||||
|
||||
/**
|
||||
* The locale of the user who invoked this interaction
|
||||
* @type {Locale}
|
||||
*/
|
||||
this.locale = data.locale;
|
||||
|
||||
/**
|
||||
* The preferred locale from the guild this interaction was sent in
|
||||
* @type {?string}
|
||||
* @type {?Locale}
|
||||
*/
|
||||
this.guildLocale = data.guild_locale ?? null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user