Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DwifteJB authored May 31, 2024
1 parent 29a50bb commit 94b9968
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/discord.js/src/structures/MessagePayload.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,13 @@ class MessagePayload {
}
}

const attachments = this.options.files?.map((file, index) => ({
const attachments = this.options.files?.map((file, index) => ({
id: index.toString(),
description: file.description,
duration_secs: file.duration_secs,
waveform: file.waveform
}));

if (Array.isArray(this.options.attachments)) {
this.options.attachments.push(...(attachments ?? []));
} else {
Expand Down

0 comments on commit 94b9968

Please sign in to comment.