Skip to content

Commit

Permalink
twitch: show game boxart and name
Browse files Browse the repository at this point in the history
  • Loading branch information
raylu committed Feb 23, 2024
1 parent bb2d865 commit 568884f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions twitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def live_streams(bot: Bot) -> None:
'title': stream['title'],
'image': {'url': thumbnail_url},
}
if 'game_id' in stream:
embed['thumbnail'] = {'url': 'https://static-cdn.jtvnw.net/ttv-boxart/%s-57x76.jpg' % stream['game_id']}
embed['footer'] = {'text': stream['game_name']}
# store user_id because the stream URL cannot be derived from the stream['user_name']
user_to_announce[user_id] = (announce, embed)

Expand Down

0 comments on commit 568884f

Please sign in to comment.