#Can't send avatarUrl attachment

15 messages · Page 1 of 1 (latest)

near fern
#

Hi :> I'm having another issue, and I can't seem to figure out what's wrong with it. I'm trying to send a user's avatar as an attachment instead of the avatarUrl (because I guess the link does not always convert to an image?) but I can't seem to find the way to do it. Here's the code:

viral canyonBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

dusk latch
#

apart from avatarURL having URL in all caps
<User>.displayAvatarURL() will return a default avatar if they don't have one

near fern
#

I just noticed the caps TwT

#

this is the error btw

dusk latch
#

also attachments should receive an array of attachments
if you'd like to pass a url for an attachment, consider passing the url in an array for the files option

near fern
#

the same error happens. should I rly use content: instead?

#

ah alright

#

i'll try

#

there's a weird error TwT

dusk latch
#

did you pass an array?

near fern
#

didn't :>

#

it works now, thank uu ^^