Repository: discordjs/discord.js
File: packages/builders/src/messages/Attachment.ts (TypeScript)

Code before:
import type { Buffer } from 'node:buffer';
import type { JSONEncodable, RawFile } from '@discordjs/util';
import type { RESTAPIAttachment, Snowflake } from 'discord-api-types/v10';
import { validate } from '../util/validation.js';
import { attachmentPredicate } from './Assertions.js';

/**
 * A builder that creates API-compatible JSON data for attachments.
 */
export class AttachmentBuilder implements JSONEncodable<RESTAPIAttachment> {
	/**
	 * The API data associated with this attachment.
	 */
	private readonly data: Partial<RESTAPIAttachment>;

	/**
	 * This data not included in the output of `toJSON()`. For this class specifically, this refers to binary data
	 * that will wind up being included in the multipart/form-data request, if using with the `MessageBuilder`.
	 * To retrieve this data, use {@link getRawFile}.
	 *
	 * @remarks This cannot be set via the constructor, primarily because of the behavior described
	 * {@link https://discord.com/developers/docs/reference#editing-message-attachments | here}.
	 * That is, when editing a message's attachments, you should only be providing file data for new attachments.
	 */
	private readonly fileData: Partial<Pick<RawFile, 'contentType' | 'data'>>;

	/**
	 * Creates a new attachment builder.
	 *
	 * @param data - The API data to create this attachment with
	 */
	public constructor(data: Partial<RESTAPIAttachment> = {}) {
		this.data = structuredClone(data);
		this.fileData = {};
	}

	/**
	 * Sets the id of the attachment.
	 *
	 * @param id - The id of the attachment
	 */
	public setId(id: Snowflake | number): this {
		this.data.id = id;

Review comment (suggestion):
```suggestion
	 * that will wind up being included in the multipart/form-data request, if used with the `MessageBuilder`.
```

Code after:
import type { Buffer } from 'node:buffer';
import type { JSONEncodable, RawFile } from '@discordjs/util';
import type { RESTAPIAttachment, Snowflake } from 'discord-api-types/v10';
import { validate } from '../util/validation.js';
import { attachmentPredicate } from './Assertions.js';

/**
 * A builder that creates API-compatible JSON data for attachments.
 */
export class AttachmentBuilder implements JSONEncodable<RESTAPIAttachment> {
	/**
	 * The API data associated with this attachment.
	 */
	private readonly data: Partial<RESTAPIAttachment>;

	/**
	 * This data is not included in the output of `toJSON()`. For this class specifically, this refers to binary data
	 * that will wind up being included in the multipart/form-data request, if used with the `MessageBuilder`.
	 * To retrieve this data, use {@link getRawFile}.
	 *
	 * @remarks This cannot be set via the constructor, primarily because of the behavior described
	 * {@link https://discord.com/developers/docs/reference#editing-message-attachments | here}.
	 * That is, when editing a message's attachments, you should only be providing file data for new attachments.
	 */
	private readonly fileData: Partial<Pick<RawFile, 'contentType' | 'data'>>;

	/**
	 * Creates a new attachment builder.
	 *
	 * @param data - The API data to create this attachment with
	 */
	public constructor(data: Partial<RESTAPIAttachment> = {}) {
		this.data = structuredClone(data);
		this.fileData = {};
	}

	/**
	 * Sets the id of the attachment.
	 *
	 * @param id - The id of the attachment
	 */
	public setId(id: Snowflake | number): this {
		this.data.id = id;