mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
types(AttachmentBuilder): fix data type (#8016)
* types(AttachmentBuilder): fix data type * types(MessageOptions): add AttachmentPayload
This commit is contained in:
25
packages/discord.js/typings/index.d.ts
vendored
25
packages/discord.js/typings/index.d.ts
vendored
@@ -1701,7 +1701,7 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
||||
}
|
||||
|
||||
export class AttachmentBuilder {
|
||||
public constructor(attachment: BufferResolvable | Stream, data?: RawAttachmentData);
|
||||
public constructor(attachment: BufferResolvable | Stream, data?: AttachmentData);
|
||||
public attachment: BufferResolvable | Stream;
|
||||
public description: string | null;
|
||||
public name: string | null;
|
||||
@@ -3494,6 +3494,11 @@ export interface BaseApplicationCommandData {
|
||||
defaultPermission?: boolean;
|
||||
}
|
||||
|
||||
export interface AttachmentData {
|
||||
name?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export type CommandOptionDataTypeResolvable = ApplicationCommandOptionType;
|
||||
|
||||
export type CommandOptionChannelResolvableType = ApplicationCommandOptionType.Channel;
|
||||
@@ -4715,7 +4720,14 @@ export interface MessageEditOptions {
|
||||
attachments?: JSONEncodable<AttachmentPayload>[];
|
||||
content?: string | null;
|
||||
embeds?: (JSONEncodable<APIEmbed> | APIEmbed)[] | null;
|
||||
files?: (BufferResolvable | Stream | JSONEncodable<APIAttachment> | Attachment | AttachmentBuilder)[];
|
||||
files?: (
|
||||
| BufferResolvable
|
||||
| Stream
|
||||
| JSONEncodable<APIAttachment>
|
||||
| Attachment
|
||||
| AttachmentBuilder
|
||||
| AttachmentPayload
|
||||
)[];
|
||||
flags?: BitFieldResolvable<MessageFlagsString, number>;
|
||||
allowedMentions?: MessageMentionOptions;
|
||||
components?: (
|
||||
@@ -4766,7 +4778,14 @@ export interface MessageOptions {
|
||||
| APIActionRowComponent<APIMessageActionRowComponent>
|
||||
)[];
|
||||
allowedMentions?: MessageMentionOptions;
|
||||
files?: (BufferResolvable | Stream | JSONEncodable<APIAttachment> | Attachment | AttachmentBuilder)[];
|
||||
files?: (
|
||||
| BufferResolvable
|
||||
| Stream
|
||||
| JSONEncodable<APIAttachment>
|
||||
| Attachment
|
||||
| AttachmentBuilder
|
||||
| AttachmentPayload
|
||||
)[];
|
||||
reply?: ReplyOptions;
|
||||
stickers?: StickerResolvable[];
|
||||
attachments?: JSONEncodable<AttachmentPayload>[];
|
||||
|
||||
Reference in New Issue
Block a user