withFiles
export declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionResponseCallbackData): {
body: {
attachments: {
id: string;
description: string | undefined;
}[];
content?: string | undefined;
tts?: boolean | undefined;
embeds?: import("discord-api-types/utils/internals").AddUndefinedToPossiblyUndefinedPropertiesOfInterface<import("discord-api-types/v10").APIEmbed>[] | undefined;
allowed_mentions?: import("discord-api-types/utils/internals").AddUndefinedToPossiblyUndefinedPropertiesOfInterface<import("discord-api-types/v10").APIAllowedMentions> | undefined;
components?: import("discord-api-types/utils/internals").AddUndefinedToPossiblyUndefinedPropertiesOfInterface<import("discord-api-types/v10").APIActionRowComponent<import("discord-api-types/v10").APIMessageActionRowComponent>>[] | undefined;
flags?: import("discord-api-types/v10").MessageFlags;
thread_name?: string | undefined;
};
files: {
name: string;
data: string | number | boolean | Buffer;
}[];
};
export declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionResponseCallbackData): {
body: {
attachments: {
id: string;
description: string | undefined;
}[];
content?: string | undefined;
tts?: boolean | undefined;
embeds?: import("discord-api-types/utils/internals").AddUndefinedToPossiblyUndefinedPropertiesOfInterface<import("discord-api-types/v10").APIEmbed>[] | undefined;
allowed_mentions?: import("discord-api-types/utils/internals").AddUndefinedToPossiblyUndefinedPropertiesOfInterface<import("discord-api-types/v10").APIAllowedMentions> | undefined;
components?: import("discord-api-types/utils/internals").AddUndefinedToPossiblyUndefinedPropertiesOfInterface<import("discord-api-types/v10").APIActionRowComponent<import("discord-api-types/v10").APIMessageActionRowComponent>>[] | undefined;
flags?: import("discord-api-types/v10").MessageFlags;
thread_name?: string | undefined;
};
files: {
name: string;
data: string | number | boolean | Buffer;
}[];
};
A utility function to create a form data payload given an array of file buffers
Name | Type | Optional | Description |
---|---|---|---|
files | DescriptiveRawFile[] | No | The files to create a form data payload for |
options | APIInteractionResponseCallbackData | No | The additional options for the form data payload |