From 8699b0e30390b8ca50890ec2805fc78bd9a6596b Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Fri, 10 Mar 2017 16:19:18 -0600 Subject: [PATCH] Add the uptime check to the uptime command itself --- cogs/core.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cogs/core.py b/cogs/core.py index 0e23f05..b11ce95 100644 --- a/cogs/core.py +++ b/cogs/core.py @@ -198,7 +198,7 @@ class Core: if bj_games: embed.add_field(name='Total blackjack games running', value=bj_games) - if hasattr(bot, 'uptime'): + if hasattr(self.bot, 'uptime'): embed.add_field(name='Uptime', value=(pendulum.utcnow() - self.bot.uptime).in_words()) embed.set_footer(text=self.bot.description) @@ -211,7 +211,10 @@ class Core: EXAMPLE: !uptime RESULT: A BAJILLION DAYS""" - await ctx.send("Uptime: ```\n{}```".format((pendulum.utcnow() - self.bot.uptime).in_words())) + if hasattr(self.bot, 'uptime'): + await ctx.send("Uptime: ```\n{}```".format((pendulum.utcnow() - self.bot.uptime).in_words())) + else: + await ctx.send("I've just restarted and not quite ready yet...gimme time I'm not a morning pony :c") @commands.command(aliases=['invite']) @utils.custom_perms(send_messages=True)