Search...

withFiles

declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionResponseCallbackData): {
    body: {
        attachments: {
            id: string;
            description: string | undefined;
        }[];
        content?: string | undefined;
        tts?: boolean | undefined;
        embeds?: discord_api_types_utils_internals.AddUndefinedToPossiblyUndefinedPropertiesOfInterface<discord_api_types_v10.APIEmbed>[] | undefined;
        allowed_mentions?: discord_api_types_utils_internals.AddUndefinedToPossiblyUndefinedPropertiesOfInterface<discord_api_types_v10.APIAllowedMentions> | undefined;
        components?: discord_api_types_utils_internals.AddUndefinedToPossiblyUndefinedPropertiesOfInterface<discord_api_types_v10.APIActionRowComponent<discord_api_types_v10.APIMessageActionRowComponent>>[] | undefined;
        flags?: discord_api_types_v10.MessageFlags;
        thread_name?: string | undefined;
    };
    files: {
        name: string;
        data: string | number | boolean | Buffer;
    }[];
};
declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionResponseCallbackData): {
    body: {
        attachments: {
            id: string;
            description: string | undefined;
        }[];
        content?: string | undefined;
        tts?: boolean | undefined;
        embeds?: discord_api_types_utils_internals.AddUndefinedToPossiblyUndefinedPropertiesOfInterface<discord_api_types_v10.APIEmbed>[] | undefined;
        allowed_mentions?: discord_api_types_utils_internals.AddUndefinedToPossiblyUndefinedPropertiesOfInterface<discord_api_types_v10.APIAllowedMentions> | undefined;
        components?: discord_api_types_utils_internals.AddUndefinedToPossiblyUndefinedPropertiesOfInterface<discord_api_types_v10.APIActionRowComponent<discord_api_types_v10.APIMessageActionRowComponent>>[] | undefined;
        flags?: 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
NameTypeOptionalDescription
filesDescriptiveRawFile[]NoThe files to create a form data payload for
optionsAPIInteractionResponseCallbackDataNoThe additional options for the form data payload