Skip to content

Commit

Permalink
twitch: bust discord CDN cache of thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
raylu committed Nov 20, 2023
1 parent 4d9b7fe commit 33711fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion twitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 33711fb

Please sign in to comment.