@discordjs/builders 2.0.0-dev.1765065716-5e6bd4b3d → 2.0.0-dev.1765238522-f38395ec4

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.mjs CHANGED
@@ -4955,6 +4955,11 @@ var AttachmentBuilder = class {
4955
4955
  * Creates a new attachment builder.
4956
4956
  *
4957
4957
  * @param data - The API data to create this attachment with
4958
+ * @example
4959
+ * ```ts
4960
+ * const attachment = new AttachmentBuilder().setId(1).setFileData(':)').setFilename('smiley.txt')
4961
+ * ```
4962
+ * @remarks Please note that the `id` field is required, it's rather easy to miss!
4958
4963
  */
4959
4964
  constructor(data = {}) {
4960
4965
  this.data = structuredClone(data);
@@ -5062,7 +5067,7 @@ var AttachmentBuilder = class {
5062
5067
  return {
5063
5068
  ...this.fileData,
5064
5069
  name: this.data.filename,
5065
- key: this.data.id ? `files[${this.data.id}]` : void 0
5070
+ key: this.data.id === void 0 ? void 0 : `files[${this.data.id}]`
5066
5071
  };
5067
5072
  }
5068
5073
  /**
@@ -5369,7 +5374,7 @@ var MessageBuilder = class {
5369
5374
  *
5370
5375
  * @param allowedMentions - The allowed mentions to set
5371
5376
  */
5372
- setAllowedMentions(allowedMentions) {
5377
+ setAllowedMentions(allowedMentions = new AllowedMentionsBuilder()) {
5373
5378
  this.data.allowed_mentions = resolveBuilder(allowedMentions, AllowedMentionsBuilder);
5374
5379
  return this;
5375
5380
  }
@@ -5726,7 +5731,7 @@ var MessageBuilder = class {
5726
5731
  };
5727
5732
 
5728
5733
  // src/index.ts
5729
- var version = "2.0.0-dev.1765065716-5e6bd4b3d";
5734
+ var version = "2.0.0-dev.1765238522-f38395ec4";
5730
5735
  export {
5731
5736
  ActionRowBuilder,
5732
5737
  AllowedMentionsBuilder,