/// import { Stream } from "stream"; import { BufferResolvable, AttachmentData } from "../types/index"; /** * Represents an attachment builder */ export declare class AttachmentBuilder { name: string; description?: string; contents: BufferResolvable | Stream; spoiler: boolean; /** * @param {AttachmentData} [data] Data ( nanme = required, description = not required, contents = required) */ constructor(data: AttachmentData); /** * Sets the description of this attachment. * @param {string} description The description of the file * @returns {this} This attachment */ setDescription(description: string): this; /** * Sets the file of this attachment. * @param {BufferResolvable|Stream} attachment The file * @returns {this} This attachment */ setFile(attachment: BufferResolvable | Stream): this; /** * Sets the name of this attachment. * @param {string} name The name of the file * @returns {this} This attachment */ setName(name: string): this; /** * Sets whether this attachment is a spoiler * @param {boolean} [spoiler=true] Whether the attachment should be marked as a spoiler * @returns {AttachmentBuilder} This attachment */ setSpoiler(spoiler?: boolean): this; toJSON(): this; build(): this; /** * Makes a new builder instance from a preexisting attachment structure. * @param {JSONEncodable} other The builder to construct a new instance from * @returns {AttachmentBuilder} */ static from(other: AttachmentData): AttachmentBuilder; } /** * @external APIAttachment * @see {@link https://discord.com/developers/docs/resources/channel#attachment-object} */ /** * @typedef {Object} AttachmentData * @property {string} [name] The name of the attachment * @property {string} [description] The description of the attachment */ //# sourceMappingURL=AttachmentBuilder.d.ts.map