@discordjs/builders 0.16.0-dev.1656979757-5bd6b28 → 0.16.0-dev.1657109073-8198da5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -10,12 +10,20 @@ declare const embedFieldPredicate: _sapphire_shapeshift.ObjectValidator<{
10
10
  name: string;
11
11
  value: string;
12
12
  inline: boolean | undefined;
13
- }>;
14
- declare const embedFieldsArrayPredicate: _sapphire_shapeshift.ArrayValidator<{
13
+ }, _sapphire_shapeshift.UndefinedToOptional<{
15
14
  name: string;
16
15
  value: string;
17
16
  inline: boolean | undefined;
18
- }>;
17
+ }>>;
18
+ declare const embedFieldsArrayPredicate: _sapphire_shapeshift.ArrayValidator<_sapphire_shapeshift.UndefinedToOptional<{
19
+ name: string;
20
+ value: string;
21
+ inline: boolean | undefined;
22
+ }>[], _sapphire_shapeshift.UndefinedToOptional<{
23
+ name: string;
24
+ value: string;
25
+ inline: boolean | undefined;
26
+ }>>;
19
27
  declare const fieldLengthPredicate: _sapphire_shapeshift.NumberValidator<number>;
20
28
  declare function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void;
21
29
  declare const authorNamePredicate: _sapphire_shapeshift.UnionValidator<string | null>;
@@ -25,7 +33,11 @@ declare const embedAuthorPredicate: _sapphire_shapeshift.ObjectValidator<{
25
33
  name: string | null;
26
34
  iconURL: string | null | undefined;
27
35
  url: string | null | undefined;
28
- }>;
36
+ }, _sapphire_shapeshift.UndefinedToOptional<{
37
+ name: string | null;
38
+ iconURL: string | null | undefined;
39
+ url: string | null | undefined;
40
+ }>>;
29
41
  declare const RGBPredicate: _sapphire_shapeshift.NumberValidator<number>;
30
42
  declare const colorPredicate: _sapphire_shapeshift.UnionValidator<number | [number, number, number] | null>;
31
43
  declare const descriptionPredicate: _sapphire_shapeshift.UnionValidator<string | null>;
@@ -33,7 +45,10 @@ declare const footerTextPredicate: _sapphire_shapeshift.UnionValidator<string |
33
45
  declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{
34
46
  text: string | null;
35
47
  iconURL: string | null | undefined;
36
- }>;
48
+ }, _sapphire_shapeshift.UndefinedToOptional<{
49
+ text: string | null;
50
+ iconURL: string | null | undefined;
51
+ }>>;
37
52
  declare const timestampPredicate: _sapphire_shapeshift.UnionValidator<number | Date | null>;
38
53
  declare const titlePredicate: _sapphire_shapeshift.UnionValidator<string | null>;
39
54
 
@@ -471,38 +486,52 @@ declare class SelectMenuOptionBuilder extends UnsafeSelectMenuOptionBuilder {
471
486
 
472
487
  declare const customIdValidator: _sapphire_shapeshift.StringValidator<string>;
473
488
  declare const emojiValidator: _sapphire_shapeshift.ObjectValidator<{
474
- id: string;
475
- name: string;
476
- animated: boolean;
477
- }>;
489
+ id?: string | undefined;
490
+ name?: string | undefined;
491
+ animated?: boolean | undefined;
492
+ }, _sapphire_shapeshift.UndefinedToOptional<{
493
+ id?: string | undefined;
494
+ name?: string | undefined;
495
+ animated?: boolean | undefined;
496
+ }>>;
478
497
  declare const disabledValidator: _sapphire_shapeshift.BooleanValidator<boolean>;
479
498
  declare const buttonLabelValidator: _sapphire_shapeshift.StringValidator<string>;
480
499
  declare const buttonStyleValidator: _sapphire_shapeshift.NativeEnumValidator<typeof ButtonStyle>;
481
500
  declare const placeholderValidator$1: _sapphire_shapeshift.StringValidator<string>;
482
501
  declare const minMaxValidator: _sapphire_shapeshift.NumberValidator<number>;
483
502
  declare const labelValueDescriptionValidator: _sapphire_shapeshift.StringValidator<string>;
484
- declare const optionValidator: _sapphire_shapeshift.UnionValidator<UnsafeSelectMenuOptionBuilder | {
503
+ declare const optionValidator: _sapphire_shapeshift.UnionValidator<UnsafeSelectMenuOptionBuilder | _sapphire_shapeshift.UndefinedToOptional<{
504
+ label: string;
505
+ value: string;
506
+ description: string | undefined;
507
+ emoji: _sapphire_shapeshift.UndefinedToOptional<{
508
+ id?: string | undefined;
509
+ name?: string | undefined;
510
+ animated?: boolean | undefined;
511
+ }> | undefined;
512
+ default: boolean | undefined;
513
+ }>>;
514
+ declare const optionsValidator: _sapphire_shapeshift.ArrayValidator<(UnsafeSelectMenuOptionBuilder | _sapphire_shapeshift.UndefinedToOptional<{
485
515
  label: string;
486
516
  value: string;
487
517
  description: string | undefined;
488
- emoji: {
489
- id: string;
490
- name: string;
491
- animated: boolean;
492
- } | undefined;
518
+ emoji: _sapphire_shapeshift.UndefinedToOptional<{
519
+ id?: string | undefined;
520
+ name?: string | undefined;
521
+ animated?: boolean | undefined;
522
+ }> | undefined;
493
523
  default: boolean | undefined;
494
- }>;
495
- declare const optionsValidator: _sapphire_shapeshift.BaseValidator<(UnsafeSelectMenuOptionBuilder | {
524
+ }>)[], UnsafeSelectMenuOptionBuilder | _sapphire_shapeshift.UndefinedToOptional<{
496
525
  label: string;
497
526
  value: string;
498
527
  description: string | undefined;
499
- emoji: {
500
- id: string;
501
- name: string;
502
- animated: boolean;
503
- } | undefined;
528
+ emoji: _sapphire_shapeshift.UndefinedToOptional<{
529
+ id?: string | undefined;
530
+ name?: string | undefined;
531
+ animated?: boolean | undefined;
532
+ }> | undefined;
504
533
  default: boolean | undefined;
505
- })[]>;
534
+ }>>;
506
535
  declare const optionsLengthValidator: _sapphire_shapeshift.NumberValidator<number>;
507
536
  declare function validateRequiredSelectMenuParameters(options: SelectMenuOptionBuilder[], customId?: string): void;
508
537
  declare const labelValueValidator: _sapphire_shapeshift.StringValidator<string>;
@@ -811,7 +840,7 @@ declare class ModalBuilder extends UnsafeModalBuilder {
811
840
  }
812
841
 
813
842
  declare const titleValidator: _sapphire_shapeshift.StringValidator<string>;
814
- declare const componentsValidator: _sapphire_shapeshift.BaseValidator<[ActionRowBuilder<AnyComponentBuilder>, ...ActionRowBuilder<AnyComponentBuilder>[]]>;
843
+ declare const componentsValidator: _sapphire_shapeshift.ArrayValidator<[ActionRowBuilder<AnyComponentBuilder>, ...ActionRowBuilder<AnyComponentBuilder>[]], ActionRowBuilder<AnyComponentBuilder>>;
815
844
  declare function validateRequiredParameters$2(customId?: string, title?: string, components?: ActionRowBuilder<ModalActionRowComponentBuilder>[]): void;
816
845
 
817
846
  declare const Assertions$2_titleValidator: typeof titleValidator;
@@ -1269,38 +1298,7 @@ declare function validateDefaultPermission$1(value: unknown): asserts value is b
1269
1298
  declare function validateRequired(required: unknown): asserts required is boolean;
1270
1299
  declare function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void;
1271
1300
  declare function assertReturnOfBuilder<T extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T;
1272
- declare const localizationMapPredicate: _sapphire_shapeshift.UnionValidator<{
1273
- "en-US": string | null;
1274
- "en-GB": string | null;
1275
- bg: string | null;
1276
- "zh-CN": string | null;
1277
- "zh-TW": string | null;
1278
- hr: string | null;
1279
- cs: string | null;
1280
- da: string | null;
1281
- nl: string | null;
1282
- fi: string | null;
1283
- fr: string | null;
1284
- de: string | null;
1285
- el: string | null;
1286
- hi: string | null;
1287
- hu: string | null;
1288
- it: string | null;
1289
- ja: string | null;
1290
- ko: string | null;
1291
- lt: string | null;
1292
- no: string | null;
1293
- pl: string | null;
1294
- "pt-BR": string | null;
1295
- ro: string | null;
1296
- ru: string | null;
1297
- "es-ES": string | null;
1298
- "sv-SE": string | null;
1299
- th: string | null;
1300
- tr: string | null;
1301
- uk: string | null;
1302
- vi: string | null;
1303
- } | null | undefined>;
1301
+ declare const localizationMapPredicate: _sapphire_shapeshift.UnionValidator<_sapphire_shapeshift.UndefinedToOptional<Partial<Record<"en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string | null>>> | null | undefined>;
1304
1302
  declare function validateLocalizationMap(value: unknown): asserts value is LocalizationMap;
1305
1303
  declare function validateDMPermission$1(value: unknown): asserts value is boolean | null | undefined;
1306
1304
  declare function validateDefaultMemberPermissions$1(permissions: unknown): string | null | undefined;