1
0
Fork 0
mirror of synced 2024-06-02 18:54:33 +12:00

Add avatar back to picarto embeds

This commit is contained in:
phxntxm 2017-06-12 01:48:54 -05:00
parent 05e6d0404f
commit e6bdf6c8f3

View file

@ -34,7 +34,7 @@ class Picarto:
if not self.online_channels: if not self.online_channels:
return False return False
channel = re.search("(?<=picarto.tv/)(.*)", channel).group(1) channel = re.search("(?<=picarto.tv/)(.*)", channel).group(1)
return channel in [stream['name'].lower() for stream in self.online_channels] return channel.lower() in [stream['name'].lower() for stream in self.online_channels]
async def check_channels(self): async def check_channels(self):
await self.bot.wait_until_ready() await self.bot.wait_until_ready()
@ -120,8 +120,8 @@ class Picarto:
things_to_print = ['comissions', 'adult', 'followers', 'category', 'online'] things_to_print = ['comissions', 'adult', 'followers', 'category', 'online']
embed = discord.Embed(title='{}\'s Picarto'.format(data['name']), url=member_url) embed = discord.Embed(title='{}\'s Picarto'.format(data['name']), url=member_url)
if data.get('avatar_url'): avatar_url = 'https://picarto.tv/user_data/usrimg/{}/dsdefault.jpg'.format(data['name'].lower())
embed.set_thumbnail(url=data['avatar_url']) embed.set_thumbnail(url=avatar_url)
for i, result in data.items(): for i, result in data.items():
if i in things_to_print and str(result): if i in things_to_print and str(result):