[Core] Subclassing of Bot class, Python version check

`send_cmd_help` and `user_allowed` are now part of Bot
This commit is contained in:
Twentysix
2016-11-17 15:03:14 +01:00
parent 58f1558f00
commit 7fe0126a79
2 changed files with 77 additions and 66 deletions

View File

@@ -621,9 +621,10 @@ class Owner:
@commands.command()
async def uptime(self):
"""Shows Red's uptime"""
up = abs(self.bot.uptime - int(time.perf_counter()))
up = str(datetime.timedelta(seconds=up))
await self.bot.say("`Uptime: {}`".format(up))
now = datetime.datetime.now()
uptime = (now - self.bot.uptime).seconds
uptime = datetime.timedelta(seconds=uptime)
await self.bot.say("`Uptime: {}`".format(uptime))
@commands.command()
async def version(self):