mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Streams] Fixed issue with thumbnails being None
Issue on beam but we'll check it on all services for good measure
This commit is contained in:
parent
acb0fcac29
commit
56dadb09bc
@ -382,6 +382,7 @@ class Streams:
|
||||
embed.add_field(name="Followers", value=channel["followers"])
|
||||
embed.add_field(name="Total views", value=channel["views"])
|
||||
embed.set_thumbnail(url=logo)
|
||||
if data["stream"]["preview"]["medium"]:
|
||||
embed.set_image(url=data["stream"]["preview"]["medium"] + self.rnd_attr())
|
||||
if channel["game"]:
|
||||
embed.set_footer(text="Playing: " + channel["game"])
|
||||
@ -398,6 +399,7 @@ class Streams:
|
||||
embed.add_field(name="Followers", value=channel["followers"])
|
||||
#embed.add_field(name="Views", value=channel["views"])
|
||||
embed.set_thumbnail(url=base_url + channel["user_logo"])
|
||||
if livestream["media_thumbnail"]:
|
||||
embed.set_image(url=base_url + livestream["media_thumbnail"] + self.rnd_attr())
|
||||
embed.set_footer(text="Playing: " + livestream["category_name"])
|
||||
embed.color = 0x98CB00
|
||||
@ -416,6 +418,7 @@ class Streams:
|
||||
embed.set_thumbnail(url=user["avatarUrl"])
|
||||
else:
|
||||
embed.set_thumbnail(url=default_avatar)
|
||||
if data["thumbnail"]:
|
||||
embed.set_image(url=data["thumbnail"]["url"] + self.rnd_attr())
|
||||
embed.color = 0x4C90F3
|
||||
if data["type"] is not None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user