Skip to content

Commit 19f9537

Browse files
committed
chore: nuke attachment builder
1 parent fb226c2 commit 19f9537

File tree

5 files changed

+2
-216
lines changed

5 files changed

+2
-216
lines changed

packages/discord.js/src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ exports.ApplicationEmoji = require('./structures/ApplicationEmoji.js').Applicati
111111
exports.ApplicationRoleConnectionMetadata =
112112
require('./structures/ApplicationRoleConnectionMetadata.js').ApplicationRoleConnectionMetadata;
113113
exports.Attachment = require('./structures/Attachment.js').Attachment;
114-
exports.AttachmentBuilder = require('./structures/AttachmentBuilder.js').AttachmentBuilder;
115114
exports.AutocompleteInteraction = require('./structures/AutocompleteInteraction.js').AutocompleteInteraction;
116115
exports.AutoModerationActionExecution =
117116
require('./structures/AutoModerationActionExecution.js').AutoModerationActionExecution;

packages/discord.js/src/structures/AttachmentBuilder.js

Lines changed: 0 additions & 185 deletions
This file was deleted.

packages/discord.js/src/structures/interfaces/TextBasedChannel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class TextBasedChannel {
8888
* @property {Array<(EmbedBuilder|Embed|APIEmbed)>} [embeds] The embeds for the message
8989
* @property {MessageMentionOptions} [allowedMentions] Which mentions should be parsed from the message content
9090
* (see {@link https://discord.com/developers/docs/resources/message#allowed-mentions-object here} for more details)
91-
* @property {Array<(AttachmentBuilder|Attachment|AttachmentPayload|BufferResolvable)>} [files]
91+
* @property {Array<(Attachment|AttachmentPayload|BufferResolvable)>} [files]
9292
* The files to send with the message.
9393
* @property {Array<(ActionRowBuilder|MessageTopLevelComponent|APIMessageTopLevelComponent)>} [components]
9494
* Action rows containing interactive components for the message (buttons, select menus) and other

packages/discord.js/typings/index.d.ts

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,26 +2259,6 @@ export class Message<InGuild extends boolean = boolean> extends Base {
22592259
public inGuild(): this is Message<true>;
22602260
}
22612261

2262-
export class AttachmentBuilder {
2263-
public constructor(attachment: BufferResolvable | Stream, data?: AttachmentData);
2264-
public attachment: BufferResolvable | Stream;
2265-
public description: string | null;
2266-
public name: string | null;
2267-
public title: string | null;
2268-
public waveform: string | null;
2269-
public duration: number | null;
2270-
public get spoiler(): boolean;
2271-
public setDescription(description: string): this;
2272-
public setFile(attachment: BufferResolvable | Stream, name?: string): this;
2273-
public setName(name: string): this;
2274-
public setTitle(title: string): this;
2275-
public setWaveform(waveform: string): this;
2276-
public setDuration(duration: number): this;
2277-
public setSpoiler(spoiler?: boolean): this;
2278-
public toJSON(): unknown;
2279-
public static from(other: JSONEncodable<AttachmentPayload>): AttachmentBuilder;
2280-
}
2281-
22822262
export class Attachment {
22832263
private constructor(data: APIAttachment);
22842264
private readonly attachment: BufferResolvable | Stream;
@@ -6688,14 +6668,7 @@ export interface BaseMessageOptions {
66886668
)[];
66896669
content?: string;
66906670
embeds?: readonly (APIEmbed | JSONEncodable<APIEmbed>)[];
6691-
files?: readonly (
6692-
| Attachment
6693-
| AttachmentBuilder
6694-
| AttachmentPayload
6695-
| BufferResolvable
6696-
| JSONEncodable<APIAttachment>
6697-
| Stream
6698-
)[];
6671+
files?: readonly (Attachment | AttachmentPayload | BufferResolvable | JSONEncodable<APIAttachment> | Stream)[];
66996672
}
67006673

67016674
export interface MessageOptionsPoll {

packages/discord.js/typings/index.test-d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ import type {
203203
} from './index.js';
204204
import {
205205
ActionRowBuilder,
206-
AttachmentBuilder,
207206
ChannelSelectMenuBuilder,
208207
Client,
209208
Collection,

0 commit comments

Comments
 (0)