Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
So i'm trying to request a custom image from a website and the res says that it is 200 (OK) but even then I'm getting this error which is preventing me from using the res recieved in a .setImage() function in my EmbedBuilder
8 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
my code:
and when I visit the exact link (the res console logs it), everything is normal
node: 17.9.0
what is this exact link
it makes a spotify card
api
basically
what is this exact link
nvm
it's not a png or jpeg so it gets rejected
https://api.aniket091.xyz/spotifycard?name=Hot%20N%20Cold&artists=Katy%20Perry&image=https://i.scdn.co/image/ab67616d0000b273df35c65d88dfacb5798f7291&elapsedtime=118256&totaltime=220226
ah
how shall i make it into a PNG?
because I really do want it in my .setImage() thing
alright, thanks a lot
@qjuh so I made a few changes, I added:
and then
.setImage(attachment)MessageEmbed#attachFiles
has been removed. Files should be attached via the message option object instead:
ah alright
so I have to do
thats it?
yep
@qjuh I did what you said but now its throwing another error smh
code for reference:
hmm, how do I make it into a buffer?
im sorry this is my first time working with attachment builders
nevermind
i fixed it by making the buffer the url itself