mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +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 {
|
export class AttachmentBuilder {
|
||||||
public constructor(attachment: BufferResolvable | Stream, data?: RawAttachmentData);
|
public constructor(attachment: BufferResolvable | Stream, data?: AttachmentData);
|
||||||
public attachment: BufferResolvable | Stream;
|
public attachment: BufferResolvable | Stream;
|
||||||
public description: string | null;
|
public description: string | null;
|
||||||
public name: string | null;
|
public name: string | null;
|
||||||
@@ -3494,6 +3494,11 @@ export interface BaseApplicationCommandData {
|
|||||||
defaultPermission?: boolean;
|
defaultPermission?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface AttachmentData {
|
||||||
|
name?: string;
|
||||||
|
description?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export type CommandOptionDataTypeResolvable = ApplicationCommandOptionType;
|
export type CommandOptionDataTypeResolvable = ApplicationCommandOptionType;
|
||||||
|
|
||||||
export type CommandOptionChannelResolvableType = ApplicationCommandOptionType.Channel;
|
export type CommandOptionChannelResolvableType = ApplicationCommandOptionType.Channel;
|
||||||
@@ -4715,7 +4720,14 @@ export interface MessageEditOptions {
|
|||||||
attachments?: JSONEncodable<AttachmentPayload>[];
|
attachments?: JSONEncodable<AttachmentPayload>[];
|
||||||
content?: string | null;
|
content?: string | null;
|
||||||
embeds?: (JSONEncodable<APIEmbed> | APIEmbed)[] | 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>;
|
flags?: BitFieldResolvable<MessageFlagsString, number>;
|
||||||
allowedMentions?: MessageMentionOptions;
|
allowedMentions?: MessageMentionOptions;
|
||||||
components?: (
|
components?: (
|
||||||
@@ -4766,7 +4778,14 @@ export interface MessageOptions {
|
|||||||
| APIActionRowComponent<APIMessageActionRowComponent>
|
| APIActionRowComponent<APIMessageActionRowComponent>
|
||||||
)[];
|
)[];
|
||||||
allowedMentions?: MessageMentionOptions;
|
allowedMentions?: MessageMentionOptions;
|
||||||
files?: (BufferResolvable | Stream | JSONEncodable<APIAttachment> | Attachment | AttachmentBuilder)[];
|
files?: (
|
||||||
|
| BufferResolvable
|
||||||
|
| Stream
|
||||||
|
| JSONEncodable<APIAttachment>
|
||||||
|
| Attachment
|
||||||
|
| AttachmentBuilder
|
||||||
|
| AttachmentPayload
|
||||||
|
)[];
|
||||||
reply?: ReplyOptions;
|
reply?: ReplyOptions;
|
||||||
stickers?: StickerResolvable[];
|
stickers?: StickerResolvable[];
|
||||||
attachments?: JSONEncodable<AttachmentPayload>[];
|
attachments?: JSONEncodable<AttachmentPayload>[];
|
||||||
|
|||||||
Reference in New Issue
Block a user