#Have you checked whats in `messages.attachments`
1 messages · Page 1 of 1 (latest)
?
have you checked whats in messages.attachments
MessageAttachment {
attachment: 'https://cdn.discordapp.com/attachments/941034285991878686/941314222741143582/png-clipart-computer-programming-anime-programming-language-thread-animation-gril-reading-cartoon.png',
name: 'png-clipart-computer-programming-anime-programming-language-thread-animation-gril-reading-cartoon.png',
id: '941314222741143582',
size: 69984,
proxyURL: 'https://media.discordapp.net/attachments/941034285991878686/941314222741143582/png-clipart-computer-programming-anime-programming-language-thread-animation-gril-reading-cartoon.png',
height: 985,
width: 900,
contentType: 'image/png',
ephemeral: false
}
//messages.attachments.first()
MessageAttachment {
attachment: 'https://cdn.discordapp.com/attachments/941034285991878686/941314222741143582/png-clipart-computer-programming-anime-programming-language-thread-animation-gril-reading-cartoon.png',
name: 'png-clipart-computer-programming-anime-programming-language-thread-animation-gril-reading-cartoon.png',
id: '941314222741143582',
size: 69984,
proxyURL: 'https://media.discordapp.net/attachments/941034285991878686/941314222741143582/png-clipart-computer-programming-anime-programming-language-thread-animation-gril-reading-cartoon.png',
height: 985,
width: 900,
contentType: 'image/png',
ephemeral: false
}
url isnt a key, do you mean proxyURL?
const image = messages.attachments.first().proxyURL ?? messages.embeds[0].url
TypeError: Cannot read properties of undefined (reading 'proxyURL')
so the return of first() is null