@discordjs/builders 0.14.0-dev.1650240529-9ef7ffd → 0.14.0-dev.1650413406-585169f

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
@@ -21,10 +21,19 @@ declare function validateFieldLength(amountAdding: number, fields?: APIEmbedFiel
21
21
  declare const authorNamePredicate: _sapphire_shapeshift.UnionValidator<string | null>;
22
22
  declare const imageURLPredicate: _sapphire_shapeshift.UnionValidator<string | null | undefined>;
23
23
  declare const urlPredicate: _sapphire_shapeshift.UnionValidator<string | null | undefined>;
24
+ declare const embedAuthorPredicate: _sapphire_shapeshift.ObjectValidator<{
25
+ name: string | null;
26
+ iconURL: string | null | undefined;
27
+ url: string | null | undefined;
28
+ }>;
24
29
  declare const RGBPredicate: _sapphire_shapeshift.NumberValidator<number>;
25
30
  declare const colorPredicate: _sapphire_shapeshift.UnionValidator<number | [number, number, number] | null>;
26
31
  declare const descriptionPredicate: _sapphire_shapeshift.UnionValidator<string | null>;
27
32
  declare const footerTextPredicate: _sapphire_shapeshift.UnionValidator<string | null>;
33
+ declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{
34
+ text: string | null;
35
+ iconURL: string | null | undefined;
36
+ }>;
28
37
  declare const timestampPredicate: _sapphire_shapeshift.UnionValidator<number | Date | null>;
29
38
  declare const titlePredicate: _sapphire_shapeshift.UnionValidator<string | null>;
30
39
 
@@ -38,10 +47,12 @@ declare const Assertions$5_validateFieldLength: typeof validateFieldLength;
38
47
  declare const Assertions$5_authorNamePredicate: typeof authorNamePredicate;
39
48
  declare const Assertions$5_imageURLPredicate: typeof imageURLPredicate;
40
49
  declare const Assertions$5_urlPredicate: typeof urlPredicate;
50
+ declare const Assertions$5_embedAuthorPredicate: typeof embedAuthorPredicate;
41
51
  declare const Assertions$5_RGBPredicate: typeof RGBPredicate;
42
52
  declare const Assertions$5_colorPredicate: typeof colorPredicate;
43
53
  declare const Assertions$5_descriptionPredicate: typeof descriptionPredicate;
44
54
  declare const Assertions$5_footerTextPredicate: typeof footerTextPredicate;
55
+ declare const Assertions$5_embedFooterPredicate: typeof embedFooterPredicate;
45
56
  declare const Assertions$5_timestampPredicate: typeof timestampPredicate;
46
57
  declare const Assertions$5_titlePredicate: typeof titlePredicate;
47
58
  declare namespace Assertions$5 {
@@ -56,10 +67,12 @@ declare namespace Assertions$5 {
56
67
  Assertions$5_authorNamePredicate as authorNamePredicate,
57
68
  Assertions$5_imageURLPredicate as imageURLPredicate,
58
69
  Assertions$5_urlPredicate as urlPredicate,
70
+ Assertions$5_embedAuthorPredicate as embedAuthorPredicate,
59
71
  Assertions$5_RGBPredicate as RGBPredicate,
60
72
  Assertions$5_colorPredicate as colorPredicate,
61
73
  Assertions$5_descriptionPredicate as descriptionPredicate,
62
74
  Assertions$5_footerTextPredicate as footerTextPredicate,
75
+ Assertions$5_embedFooterPredicate as embedFooterPredicate,
63
76
  Assertions$5_timestampPredicate as timestampPredicate,
64
77
  Assertions$5_titlePredicate as titlePredicate,
65
78
  };
package/dist/index.js CHANGED
@@ -103,8 +103,10 @@ __export(Assertions_exports, {
103
103
  authorNamePredicate: () => authorNamePredicate,
104
104
  colorPredicate: () => colorPredicate,
105
105
  descriptionPredicate: () => descriptionPredicate,
106
+ embedAuthorPredicate: () => embedAuthorPredicate,
106
107
  embedFieldPredicate: () => embedFieldPredicate,
107
108
  embedFieldsArrayPredicate: () => embedFieldsArrayPredicate,
109
+ embedFooterPredicate: () => embedFooterPredicate,
108
110
  fieldInlinePredicate: () => fieldInlinePredicate,
109
111
  fieldLengthPredicate: () => fieldLengthPredicate,
110
112
  fieldNamePredicate: () => fieldNamePredicate,
@@ -138,10 +140,19 @@ var imageURLPredicate = import_shapeshift.s.string.url({
138
140
  var urlPredicate = import_shapeshift.s.string.url({
139
141
  allowedProtocols: ["http:", "https:"]
140
142
  }).nullish;
143
+ var embedAuthorPredicate = import_shapeshift.s.object({
144
+ name: authorNamePredicate,
145
+ iconURL: imageURLPredicate,
146
+ url: urlPredicate
147
+ });
141
148
  var RGBPredicate = import_shapeshift.s.number.int.ge(0).le(255);
142
149
  var colorPredicate = import_shapeshift.s.number.int.ge(0).le(16777215).or(import_shapeshift.s.tuple([RGBPredicate, RGBPredicate, RGBPredicate])).nullable;
143
150
  var descriptionPredicate = import_shapeshift.s.string.lengthGe(1).lengthLe(4096).nullable;
144
151
  var footerTextPredicate = import_shapeshift.s.string.lengthGe(1).lengthLe(2048).nullable;
152
+ var embedFooterPredicate = import_shapeshift.s.object({
153
+ text: footerTextPredicate,
154
+ iconURL: imageURLPredicate
155
+ });
145
156
  var timestampPredicate = import_shapeshift.s.union(import_shapeshift.s.number, import_shapeshift.s.date).nullable;
146
157
  var titlePredicate = fieldNamePredicate.nullable;
147
158
 
@@ -240,9 +251,7 @@ var EmbedBuilder = class extends UnsafeEmbedBuilder {
240
251
  if (options === null) {
241
252
  return super.setAuthor(null);
242
253
  }
243
- authorNamePredicate.parse(options.name);
244
- urlPredicate.parse(options.iconURL);
245
- urlPredicate.parse(options.url);
254
+ embedAuthorPredicate.parse(options);
246
255
  return super.setAuthor(options);
247
256
  }
248
257
  setColor(color) {
@@ -255,8 +264,7 @@ var EmbedBuilder = class extends UnsafeEmbedBuilder {
255
264
  if (options === null) {
256
265
  return super.setFooter(null);
257
266
  }
258
- footerTextPredicate.parse(options.text);
259
- urlPredicate.parse(options.iconURL);
267
+ embedFooterPredicate.parse(options);
260
268
  return super.setFooter(options);
261
269
  }
262
270
  setImage(url) {