mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -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 {
|
try {
|
||||||
const attachmentsComponent = []
|
const attachmentsComponent = []
|
||||||
if (message.attachments) {
|
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({
|
attachmentsComponent.push({
|
||||||
text: message.content === '' ? '[Attachment]' : ' [Attachment]', // may not be the best fix
|
text: message.content === '' ? '[Attachment]' : ' [Attachment]', // may not be the best fix
|
||||||
color: 'green',
|
color: 'green',
|
||||||
clickEvent: {
|
clickEvent: {
|
||||||
action: 'open_url',
|
action: 'open_url',
|
||||||
value: value.proxyURL
|
value: attachment.proxyURL
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue