From 33711fb12814c7641c032082b3a267d1a3ba3434 Mon Sep 17 00:00:00 2001 From: raylu <90059+raylu@users.noreply.github.com> Date: Sun, 19 Nov 2023 23:10:25 -0800 Subject: [PATCH] twitch: bust discord CDN cache of thumbnails --- twitch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/twitch.py b/twitch.py index 0bb1484..c340c55 100644 --- a/twitch.py +++ b/twitch.py @@ -49,7 +49,8 @@ def live_streams(bot: Bot) -> None: continue config.state.twitch_last_times[user_id] = now - thumbnail_url = stream['thumbnail_url'].replace('{width}', '256').replace('{height}', '144') + thumbnail_url = stream['thumbnail_url'].replace('{width}', '256').replace('{height}', '144') + \ + '?' + time.time() # https://discuss.dev.twitch.com/t/thumbnail-urls-in-helix-users-endpoint/26792/4 embed = { 'title': stream['title'], 'image': {'url': thumbnail_url},