diff --git a/plugins/discord.js b/plugins/discord.js index cfd0d2a..c111405 100644 --- a/plugins/discord.js +++ b/plugins/discord.js @@ -39,13 +39,15 @@ async function inject (bot, dcclient, config) { try { const attachmentsComponent = [] if (message.attachments) { - for (const value of message.attachments) { + for (const __attachment of message.attachments) { + const _attachment = [...__attachment] + const attachment = _attachment[1] // BEST WAY REAL!?/1?! attachmentsComponent.push({ text: message.content === '' ? '[Attachment]' : ' [Attachment]', // may not be the best fix color: 'green', clickEvent: { action: 'open_url', - value: value.proxyURL + value: attachment.proxyURL } }) }