@@ -65,7 +65,7 @@ class ApplicationCommand extends Base {
65
65
if ( 'name_localizations' in data ) {
66
66
/**
67
67
* The name localizations for this command
68
- * @type {?Object<string , string> }
68
+ * @type {?Object<Locale , string> }
69
69
*/
70
70
this . nameLocalizations = data . name_localizations ;
71
71
} else {
@@ -75,7 +75,7 @@ class ApplicationCommand extends Base {
75
75
if ( 'name_localized' in data ) {
76
76
/**
77
77
* The localized name for this command
78
- * @type {?Object< string, string> }
78
+ * @type {?string }
79
79
*/
80
80
this . nameLocalized = data . name_localized ;
81
81
} else {
@@ -93,7 +93,7 @@ class ApplicationCommand extends Base {
93
93
if ( 'description_localizations' in data ) {
94
94
/**
95
95
* The description localizations for this command
96
- * @type {?string }
96
+ * @type {?Object<Locale, string> }
97
97
*/
98
98
this . descriptionLocalizations = data . description_localizations ;
99
99
} else {
@@ -168,9 +168,9 @@ class ApplicationCommand extends Base {
168
168
* Data for creating or editing an application command.
169
169
* @typedef {Object } ApplicationCommandData
170
170
* @property {string } name The name of the command
171
- * @property {Object<string , string> } [nameLocalizations] The localizations for the command name
171
+ * @property {Object<Locale , string> } [nameLocalizations] The localizations for the command name
172
172
* @property {string } description The description of the command
173
- * @property {Object<string , string> } [descriptionLocalizations] The localizations for the command description
173
+ * @property {Object<Locale , string> } [descriptionLocalizations] The localizations for the command description
174
174
* @property {ApplicationCommandType } [type] The type of the command
175
175
* @property {ApplicationCommandOptionData[] } [options] Options for the command
176
176
* @property {boolean } [defaultPermission] Whether the command is enabled by default when the app is added to a guild
@@ -185,9 +185,9 @@ class ApplicationCommand extends Base {
185
185
* @typedef {Object } ApplicationCommandOptionData
186
186
* @property {ApplicationCommandOptionType|number } type The type of the option
187
187
* @property {string } name The name of the option
188
- * @property {Object<string , string> } [nameLocalizations] The name localizations for the option
188
+ * @property {Object<Locale , string> } [nameLocalizations] The name localizations for the option
189
189
* @property {string } description The description of the option
190
- * @property {Object<string , string> } [descriptionLocalizations] The description localizations for the option
190
+ * @property {Object<Locale , string> } [descriptionLocalizations] The description localizations for the option
191
191
* @property {boolean } [autocomplete] Whether the option is an autocomplete option
192
192
* @property {boolean } [required] Whether the option is required
193
193
* @property {ApplicationCommandOptionChoiceData[] } [choices] The choices of the option for the user to pick from
@@ -201,15 +201,10 @@ class ApplicationCommand extends Base {
201
201
/**
202
202
* @typedef {Object } ApplicationCommandOptionChoiceData
203
203
* @property {string } name The name of the choice
204
- * @property {Object<string , string> } [nameLocalizations] The localized names for this choice
204
+ * @property {Object<Locale , string> } [nameLocalizations] The localized names for this choice
205
205
* @property {string|number } value The value of the choice
206
206
*/
207
207
208
- /**
209
- * @typedef {ApplicationCommandOptionChoiceData } ApplicationCommandOptionChoice
210
- * @property {string } [nameLocalized] The localized name for this choice
211
- */
212
-
213
208
/**
214
209
* Edits this application command.
215
210
* @param {ApplicationCommandData } data The data to update the command with
@@ -237,7 +232,7 @@ class ApplicationCommand extends Base {
237
232
238
233
/**
239
234
* Edits the localized names of this ApplicationCommand
240
- * @param {Object<string , string> } nameLocalizations The new localized names for the command
235
+ * @param {Object<Locale , string> } nameLocalizations The new localized names for the command
241
236
* @returns {Promise<ApplicationCommand> }
242
237
* @example
243
238
* // Edit the name localizations of this command
@@ -263,7 +258,7 @@ class ApplicationCommand extends Base {
263
258
264
259
/**
265
260
* Edits the localized descriptions of this ApplicationCommand
266
- * @param {Object<string , string> } descriptionLocalizations The new localized descriptions for the command
261
+ * @param {Object<Locale , string> } descriptionLocalizations The new localized descriptions for the command
267
262
* @returns {Promise<ApplicationCommand> }
268
263
* @example
269
264
* // Edit the description localizations of this command
@@ -449,6 +444,15 @@ class ApplicationCommand extends Base {
449
444
* @property {number } [maxValue] The maximum value for an `INTEGER` or `NUMBER` option
450
445
*/
451
446
447
+ /**
448
+ * A choice for an application command option.
449
+ * @typedef {Object } ApplicationCommandOptionChoice
450
+ * @property {string } name The name of the choice
451
+ * @property {?string } nameLocalized The localized name of the choice in the provided locale, if any
452
+ * @property {?Object<string, string> } [nameLocalizations] The localized names for this choice
453
+ * @property {string|number } value The value of the choice
454
+ */
455
+
452
456
/**
453
457
* Transforms an {@link ApplicationCommandOptionData} object into something that can be used with the API.
454
458
* @param {ApplicationCommandOptionData|ApplicationCommandOption } option The option to transform
0 commit comments