-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
refactor!: remove AttachmentBuilder and support new file body encodables #11278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
Ready for review, but blocked until the other PR is merged. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5fc03b1 to
2207fa3
Compare
Co-authored-by: Jiralite <[email protected]>
| * @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] |
There was a problem hiding this comment.
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 🤷♂️
There was a problem hiding this comment.
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?
Depends on #11248
Closes #11273