1
0
Fork 0
mirror of synced 2024-05-20 12:32:26 +12:00

Add the uptime check to the uptime command itself

This commit is contained in:
Phxntxm 2017-03-10 16:19:18 -06:00
parent 67d717cff7
commit 8699b0e303

View file

@ -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)