1
0
Fork 0
mirror of synced 2024-06-28 11:10:27 +12:00

Removed error printing, changed up how the name is printed

This commit is contained in:
phxntxm 2016-08-08 18:43:18 -05:00
parent e7b4f1c980
commit e07bc8359e

View file

@ -31,7 +31,6 @@ class Picarto:
self.bot = bot
async def check_channels(self):
try:
await self.bot.wait_until_ready()
while not self.bot.is_closed:
picarto = config.getContent('picarto') or {}
@ -50,7 +49,7 @@ class Picarto:
channel = self.bot.get_channel(channel_id)
picarto[m_id]['live'] = 1
fmt = "{} has just gone live! View their stream at {}".format(member.name, url)
fmt = "{} has just gone live! View their stream at {}".format(member.display_name, url)
await self.bot.send_message(channel, fmt)
config.saveContent('picarto', picarto)
elif live and not online:
@ -60,15 +59,12 @@ class Picarto:
channel = self.bot.get_channel(channel_id)
picarto[m_id]['live'] = 0
fmt = "{} has just gone offline! Catch them next time they stream at {}".format(member.name, url)
fmt = "{} has just gone offline! Catch them next time they stream at {}".format(member.display_name,
url)
await self.bot.send_message(channel, fmt)
config.saveContent('picarto', picarto)
pass
await asyncio.sleep(30)
except Exception as error:
with open("/home/phxntx5/public_html/Bonfire/error_log", 'a') as f:
traceback.print_tb(error.original.__traceback__, file=f)
print('{0.__class__.__name__}: {0}'.format(error.original), file=f)
@commands.group(pass_context=True, invoke_without_command=True)
@checks.customPermsOrRole(send_messages=True)