So I’m requesting information about streams for a few users via the helix/users endpoint https://api.twitch.tv/helix/users?client_id=<id>&user_login=<name1>&user_login=<name2>...
Extracting the thumbnail_url with
for(var streamobject of body.data){
thumbnail_url = streamobject["thumbnail_url"];
...
}
works just fine, I get the correct url. But how does the thumbnail storage work in the background? Because when I get the thumbnail_url two days later from the same streamer, then the thumbnail is the same as 2 days ago, even when I restart my bot in between. Shouldn’t the thumbnail change? And if so, I should be able to clear the cache if that’s the problem, or?
Oops, my bad. I copied the wrong line of course I meant https://api.twitch.tv/helix/streams
I’m using this thumbnail in a Discord embed. The problem I have here is, that the image is the same at any time for a certain streamer. Even when I look at the thumbnail in my browser.
So It’s not a problem per-se, but I wanted to ask if this is the way it has to be. I thought, the image updates on the server when a streamer goes live or something.
There’s your problem. Discord is caching the link/image/preview.
Discord will never bother to go and check if the image actually changed, if it already has it, as it copies a instance of the image to it’s server(s) to avoid IP farming. Among other things