diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index f2024d8fa..cad5c9003 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3971,7 +3971,7 @@ export interface CommandInteractionOption member?: CacheTypeReducer; channel?: CacheTypeReducer; role?: CacheTypeReducer; - attachment?: AttachmentBuilder; + attachment?: Attachment; message?: Message>; } @@ -3981,7 +3981,7 @@ export interface CommandInteractionResolvedData>; channels?: Collection>; messages?: Collection>; - attachments?: Collection; + attachments?: Collection; } export declare const Colors: { @@ -4707,7 +4707,7 @@ export interface MessageEditOptions { attachments?: JSONEncodable[]; content?: string | null; embeds?: (JSONEncodable | APIEmbed)[] | null; - files?: (AttachmentPayload | BufferResolvable | Stream | AttachmentBuilder)[]; + files?: (BufferResolvable | Stream | JSONEncodable | Attachment | AttachmentBuilder)[]; flags?: BitFieldResolvable; allowedMentions?: MessageMentionOptions; components?: ( @@ -4758,10 +4758,10 @@ export interface MessageOptions { | APIActionRowComponent )[]; allowedMentions?: MessageMentionOptions; - files?: (Attachment | AttachmentBuilder | BufferResolvable | Stream)[]; + files?: (BufferResolvable | Stream | JSONEncodable | Attachment | AttachmentBuilder)[]; reply?: ReplyOptions; stickers?: StickerResolvable[]; - attachments?: (Attachment | AttachmentBuilder)[]; + attachments?: JSONEncodable[]; flags?: BitFieldResolvable, number>; } diff --git a/packages/discord.js/typings/index.test-d.ts b/packages/discord.js/typings/index.test-d.ts index 4240c2ad5..84fbb616a 100644 --- a/packages/discord.js/typings/index.test-d.ts +++ b/packages/discord.js/typings/index.test-d.ts @@ -122,6 +122,7 @@ import { ChannelMention, UserMention, PartialGroupDMChannel, + Attachment, } from '.'; import { expectAssignable, expectDeprecated, expectNotAssignable, expectNotType, expectType } from 'tsd'; import { UnsafeButtonBuilder, UnsafeEmbedBuilder, UnsafeSelectMenuBuilder } from '@discordjs/builders'; @@ -1491,8 +1492,8 @@ expectNotAssignable>({ declare const chatInputInteraction: ChatInputCommandInteraction; -expectType(chatInputInteraction.options.getAttachment('attachment', true)); -expectType(chatInputInteraction.options.getAttachment('attachment')); +expectType(chatInputInteraction.options.getAttachment('attachment', true)); +expectType(chatInputInteraction.options.getAttachment('attachment')); declare const modal: ModalBuilder;