Skip to content

Commit 568884f

Browse files
committed
twitch: show game boxart and name
1 parent bb2d865 commit 568884f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

twitch.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ def live_streams(bot: Bot) -> None:
5555
'title': stream['title'],
5656
'image': {'url': thumbnail_url},
5757
}
58+
if 'game_id' in stream:
59+
embed['thumbnail'] = {'url': 'https://static-cdn.jtvnw.net/ttv-boxart/%s-57x76.jpg' % stream['game_id']}
60+
embed['footer'] = {'text': stream['game_name']}
5861
# store user_id because the stream URL cannot be derived from the stream['user_name']
5962
user_to_announce[user_id] = (announce, embed)
6063

0 commit comments

Comments
 (0)