mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
feat(MessageAttachment): description (alt text) support (#6871)
Co-authored-by: D Trombett <maxtromb.dt@gmail.com>
This commit is contained in:
@@ -50,8 +50,8 @@ class APIRequest {
|
||||
let body;
|
||||
if (this.options.files?.length) {
|
||||
body = new FormData();
|
||||
for (const file of this.options.files) {
|
||||
if (file?.file) body.append(file.key ?? file.name, file.file, file.name);
|
||||
for (const [index, file] of this.options.files.entries()) {
|
||||
if (file?.file) body.append(file.key ?? `files[${index}]`, file.file, file.name);
|
||||
}
|
||||
if (typeof this.options.data !== 'undefined') {
|
||||
if (this.options.dontUsePayloadJSON) {
|
||||
|
||||
Reference in New Issue
Block a user