Embed image doesn't show since couple of days.
I am not sure if it is discord.js problem.
My bot once a day posts 3 embeds with images.
In 2 of 3 embeds images are displayed correctly, in last embed image is not displayed at all since 5 days.
I checked embed source, image url and proxy_url are set correctly, however image width and height is 0.
When i open that image url (from not working embed) in the browser it clearly shows image is 560 x 400 px. When i open image from working embed it shows the same thing.
Even weirder is that, if i request exactly the same embed with slash command, it displays image correctly, problem exists only with automated posts with cron.
discord.js - 14.16.3
node.js - 20.16.0
OS - Ubuntu 20.04
Is there any way i can force width and height of that image inside embed?
2 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!i checked it twice,
console.log(JSON.stringify(sentMessage.embeds))
right after bot sent that message,
and also fetched message by id, both are identical:
(paths are different than in original post because i tested if that's cache issue, but nothing changed)
when i request that embed with slash command, width and height are set correctly.
Part of the code to create embed is shared with cron and slash command,
Other embeds that works fine are structured the same way.
Maybe something is wrong with that images, but it was working fine for over 3 years.