@@ -226,6 +226,10 @@ class ApplicationCommand extends Base {
226
226
* the allowed types of channels that can be selected
227
227
* @property {number } [minValue] The minimum value for an `INTEGER` or `NUMBER` option
228
228
* @property {number } [maxValue] The maximum value for an `INTEGER` or `NUMBER` option
229
+ * @property {number } [minLength] The minimum length for a `STRING` option
230
+ * (maximum of `6000`)
231
+ * @property {number } [maxLength] The maximum length for a `STRING` option
232
+ * (maximum of `6000`)
229
233
*/
230
234
231
235
/**
@@ -454,7 +458,9 @@ class ApplicationCommand extends Base {
454
458
option . options ?. length !== existing . options ?. length ||
455
459
( option . channelTypes ?? option . channel_types ) ?. length !== existing . channelTypes ?. length ||
456
460
( option . minValue ?? option . min_value ) !== existing . minValue ||
457
- ( option . maxValue ?? option . max_value ) !== existing . maxValue
461
+ ( option . maxValue ?? option . max_value ) !== existing . maxValue ||
462
+ ( option . minLength ?? option . min_length ) !== existing . minLength ||
463
+ ( option . maxLength ?? option . max_length ) !== existing . maxLength
458
464
) {
459
465
return false ;
460
466
}
@@ -510,6 +516,10 @@ class ApplicationCommand extends Base {
510
516
* the allowed types of channels that can be selected
511
517
* @property {number } [minValue] The minimum value for an `INTEGER` or `NUMBER` option
512
518
* @property {number } [maxValue] The maximum value for an `INTEGER` or `NUMBER` option
519
+ * @property {number } [minLength] The minimum length for a `STRING` option
520
+ * (maximum of `6000`)
521
+ * @property {number } [maxLength] The maximum length for a `STRING` option
522
+ * (maximum of `6000`)
513
523
*/
514
524
515
525
/**
@@ -533,6 +543,8 @@ class ApplicationCommand extends Base {
533
543
const channelTypesKey = received ? 'channelTypes' : 'channel_types' ;
534
544
const minValueKey = received ? 'minValue' : 'min_value' ;
535
545
const maxValueKey = received ? 'maxValue' : 'max_value' ;
546
+ const minLengthKey = received ? 'minLength' : 'min_length' ;
547
+ const maxLengthKey = received ? 'maxLength' : 'max_length' ;
536
548
const nameLocalizationsKey = received ? 'nameLocalizations' : 'name_localizations' ;
537
549
const nameLocalizedKey = received ? 'nameLocalized' : 'name_localized' ;
538
550
const descriptionLocalizationsKey = received ? 'descriptionLocalizations' : 'description_localizations' ;
@@ -562,6 +574,8 @@ class ApplicationCommand extends Base {
562
574
option . channel_types ,
563
575
[ minValueKey ] : option . minValue ?? option . min_value ,
564
576
[ maxValueKey ] : option . maxValue ?? option . max_value ,
577
+ [ minLengthKey ] : option . minLength ?? option . min_length ,
578
+ [ maxLengthKey ] : option . maxLength ?? option . max_length ,
565
579
} ;
566
580
}
567
581
}
0 commit comments