Embed: Wrong image in iconURL

Hello! I'm with Typescript. I generate my image using my GitHub repository, so I just need to push to it and use https://raw.githubusercontent.com/${GITHUB}/master/images The image has been successfully pushed (for example, see : https://raw.githubusercontent.com/lisandra-dev/velum-bot/master/images/meteo/moon/waxing-crescent.png) But, my bot continue to load/display the old version of the image, as I changed the image previously. How cache image works in discord ? How can I fix that ? I use a link like that:
const moon = {
"Waxing Crescent" : `${IMAGE_LINK}/meteo/moon/waxing-crescent.png`, //🌒
"First Quarter" : `${IMAGE_LINK}/meteo/moon/first-quarter.png`, //🌓
"New" : `${IMAGE_LINK}/meteo/moon/new-moon.png`, //🌑
"Waxing Gibbous" : `${IMAGE_LINK}/meteo/moon/waxing-gibbous.png`, //🌔
"Full" : `${IMAGE_LINK}/meteo/moon/full-moon.png`, //🌕
"Waning Gibbous" : `${IMAGE_LINK}/meteo/moon/waning-gibbous.png`, //🌖
"Last Quarter" : `${IMAGE_LINK}/meteo/moon/third-quarter.png`, //🌗
"Waning Crescent" : `${IMAGE_LINK}/meteo/moon/waning-crescent.png`, //🌘
};

let embed = new EmbedBuilder()
.setThumbnail(icon)
.setDescription(capitalize(data.weather.description))
.setAuthor({
name: `${city} · ${main}`,
iconURL: `${moon[Moon.lunarPhase()]}` as string,
})
const moon = {
"Waxing Crescent" : `${IMAGE_LINK}/meteo/moon/waxing-crescent.png`, //🌒
"First Quarter" : `${IMAGE_LINK}/meteo/moon/first-quarter.png`, //🌓
"New" : `${IMAGE_LINK}/meteo/moon/new-moon.png`, //🌑
"Waxing Gibbous" : `${IMAGE_LINK}/meteo/moon/waxing-gibbous.png`, //🌔
"Full" : `${IMAGE_LINK}/meteo/moon/full-moon.png`, //🌕
"Waning Gibbous" : `${IMAGE_LINK}/meteo/moon/waning-gibbous.png`, //🌖
"Last Quarter" : `${IMAGE_LINK}/meteo/moon/third-quarter.png`, //🌗
"Waning Crescent" : `${IMAGE_LINK}/meteo/moon/waning-crescent.png`, //🌘
};

let embed = new EmbedBuilder()
.setThumbnail(icon)
.setDescription(capitalize(data.weather.description))
.setAuthor({
name: `${city} · ${main}`,
iconURL: `${moon[Moon.lunarPhase()]}` as string,
})
3 Replies
d.js toolkit
d.js toolkit16mo ago
- 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. - Issue solved? Press the button!
Mara
Mara16mo ago
I don't have any error but here the screenshot and the image that must be displayed
Mara
Mara16mo ago
Moreover strange, using .setImage load the good image :
let embed = new EmbedBuilder()
.setThumbnail(icon)
.setDescription(capitalize(data.weather.description))
.setAuthor({
name: `${city} · ${main}`,
iconURL: "https://raw.githubusercontent.com/lisandra-dev/velum-bot/master/images/meteo/moon/waxing-crescent.png",
})
.setImage("https://raw.githubusercontent.com/lisandra-dev/velum-bot/master/images/meteo/moon/waxing-crescent.png")
.setTimestamp()
let embed = new EmbedBuilder()
.setThumbnail(icon)
.setDescription(capitalize(data.weather.description))
.setAuthor({
name: `${city} · ${main}`,
iconURL: "https://raw.githubusercontent.com/lisandra-dev/velum-bot/master/images/meteo/moon/waxing-crescent.png",
})
.setImage("https://raw.githubusercontent.com/lisandra-dev/velum-bot/master/images/meteo/moon/waxing-crescent.png")
.setTimestamp()
Want results from more Discord servers?
Add your server