Sleep a bit more if bot isnt responding

This commit is contained in:
Jeremy Zhang
2019-03-05 21:02:33 +00:00
parent 29c1d8bfda
commit c62661ec6c
3 changed files with 254 additions and 13 deletions

View File

@ -21,11 +21,6 @@ logging.getLogger('sqlalchemy')
# except raven.exceptions.InvalidDsn:
# pass
try:
create_task = asyncio.ensure_future
except AttributeError:
create_task = getattr(asyncio, 'async')
class Titan(discord.AutoShardedClient):
def __init__(self):
super().__init__(
@ -71,7 +66,7 @@ class Titan(discord.AutoShardedClient):
async def start(self):
await self.redisqueue.connect()
create_task(self.redisqueue.subscribe())
self.loop.create_task(self.redisqueue.subscribe())
await super().start(config["bot-token"])
async def on_ready(self):