mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
feat(MessageAttachment): description (alt text) support (#6871)
Co-authored-by: D Trombett <maxtromb.dt@gmail.com>
This commit is contained in:
@@ -177,6 +177,16 @@ class MessagePayload {
|
||||
}
|
||||
}
|
||||
|
||||
const attachments = this.options.files?.map((file, index) => ({
|
||||
id: index.toString(),
|
||||
description: file.description,
|
||||
}));
|
||||
if (Array.isArray(this.options.attachments)) {
|
||||
this.options.attachments.push(...attachments);
|
||||
} else {
|
||||
this.options.attachments = attachments;
|
||||
}
|
||||
|
||||
this.data = {
|
||||
content,
|
||||
tts,
|
||||
|
||||
Reference in New Issue
Block a user