mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-13 18:34:54 -05:00
discord attachment fix yup
This commit is contained in:
parent
e8ef5d8082
commit
8332c2c15d
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue