3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

fix: show all attachment URLs in !message, fix crash with attachments

This commit is contained in:
Dragory 2021-12-19 17:47:21 +02:00
parent ff160be1fa
commit d5363449a0
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -130,9 +130,10 @@ export async function getMessageInfoEmbed(
} }
if (message.attachments.size) { if (message.attachments.size) {
const attachmentUrls = message.attachments.map((att) => att.url);
embed.fields.push({ embed.fields.push({
name: preEmbedPadding + "Attachments", name: preEmbedPadding + "Attachments",
value: message.attachments[0].url, value: attachmentUrls.join("\n"),
}); });
} }