refactor!: remove AttachmentBuilder and support new file body encodables (#11278)

BREAKING CHANGE: Remove AttachmentBuilder

---------

Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
Denis-Adrian Cristea
2025-12-08 10:19:43 +02:00
committed by GitHub
parent 5888663392
commit 9005c8ae9c
11 changed files with 87 additions and 263 deletions

View File

@@ -28,6 +28,11 @@ export class AttachmentBuilder implements JSONEncodable<RESTAPIAttachment> {
* Creates a new attachment builder.
*
* @param data - The API data to create this attachment with
* @example
* ```ts
* const attachment = new AttachmentBuilder().setId(1).setFileData(':)').setFilename('smiley.txt')
* ```
* @remarks Please note that the `id` field is required, it's rather easy to miss!
*/
public constructor(data: Partial<RESTAPIAttachment> = {}) {
this.data = structuredClone(data);