Skip to content

Conversation

@didinele
Copy link
Member

@didinele didinele commented Nov 17, 2025

Depends on #11248

Closes #11273

@vercel vercel bot temporarily deployed to Preview – discord-js November 17, 2025 07:41 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js-guide November 17, 2025 07:41 Inactive
@vercel
Copy link

vercel bot commented Nov 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
discord-js Skipped Skipped Nov 20, 2025 1:23pm
discord-js-guide Skipped Skipped Nov 20, 2025 1:23pm

@didinele didinele changed the title feat(builders): multipart form data output support refactor: new AttachmentBuilder in mainlib Nov 17, 2025
@didinele didinele changed the title refactor: new AttachmentBuilder in mainlib refactor: new MessageBuilder in mainlib Nov 17, 2025
@vercel vercel bot temporarily deployed to Preview – discord-js-guide November 17, 2025 09:39 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js November 17, 2025 09:39 Inactive
@didinele
Copy link
Member Author

Ready for review, but blocked until the other PR is merged.

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.97%. Comparing base (68bb8af) to head (e6aef1e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11278   +/-   ##
=======================================
  Coverage   44.97%   44.97%           
=======================================
  Files         317      317           
  Lines       18222    18222           
  Branches     1817     1817           
=======================================
  Hits         8196     8196           
  Misses      10013    10013           
  Partials       13       13           
Flag Coverage Δ
builders 81.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@didinele didinele force-pushed the refactor/mainlib-for-builders-updates branch from 5fc03b1 to 2207fa3 Compare November 20, 2025 08:42
@vercel vercel bot temporarily deployed to Preview – discord-js November 20, 2025 08:42 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js-guide November 20, 2025 08:42 Inactive
@didinele didinele marked this pull request as ready for review November 20, 2025 08:43
@didinele didinele requested a review from a team as a code owner November 20, 2025 08:43
@Jiralite Jiralite added this to the discord.js 15.0.0 milestone Nov 20, 2025
@vercel vercel bot temporarily deployed to Preview – discord-js November 20, 2025 10:52 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js-guide November 20, 2025 10:52 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js November 20, 2025 11:00 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js-guide November 20, 2025 11:00 Inactive
@didinele didinele changed the title feat: new MessageBuilder in discord.js refactor: remove AttachmentBuilder and support new file body encodables Nov 20, 2025
@didinele didinele changed the title refactor: remove AttachmentBuilder and support new file body encodables refactor!: remove AttachmentBuilder and support new file body encodables Nov 20, 2025
@Jiralite Jiralite dismissed their stale review November 20, 2025 11:09

Resolved.

@vercel vercel bot temporarily deployed to Preview – discord-js November 20, 2025 11:14 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js-guide November 20, 2025 11:14 Inactive
@didinele didinele requested a review from Jiralite November 20, 2025 12:53
@didinele didinele requested a review from a team as a code owner November 20, 2025 12:53
@vercel vercel bot temporarily deployed to Preview – discord-js-guide November 20, 2025 12:53 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js November 20, 2025 12:53 Inactive
Co-authored-by: Jiralite <[email protected]>
@vercel vercel bot temporarily deployed to Preview – discord-js-guide November 20, 2025 13:22 Inactive
@vercel vercel bot temporarily deployed to Preview – discord-js November 20, 2025 13:23 Inactive
@didinele didinele requested a review from Jiralite November 20, 2025 13:23
* @property {MessageMentionOptions} [allowedMentions] Which mentions should be parsed from the message content
* (see {@link https://discord.com/developers/docs/resources/message#allowed-mentions-object here} for more details)
* @property {Array<(AttachmentBuilder|Attachment|AttachmentPayload|BufferResolvable)>} [files]
* @property {Array<(Attachment|AttachmentPayload|BufferResolvable)>} [files]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer if there was still a way to pass an AttachmentBuilder into here, albeit not sure what type would make sense to put for that here.

Another helper type like RawFileEncodable which extends JSONEncodable with the additional getRawFile() method? Seems clunky but 🤷‍♂️

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main issue I have with this is that AttachmentBuilder includes data tied to.. well, the attachments array.

What do we do when the user sets that data and they also provide attachments manually?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Review in Progress

Development

Successfully merging this pull request may close these issues.

Remove AttachmentBuilder from discord.js

5 participants