more fixes, removing bot.loop

This commit is contained in:
brandons209 2020-03-22 02:20:49 -04:00
parent 5eabe3ae57
commit 3af5dfbc8d
2 changed files with 4 additions and 4 deletions

View file

@ -947,7 +947,7 @@ class Isolate(commands.Cog):
if diff < 0:
self.execute_queue_event(*args)
elif run_at - time.time() < QUEUE_TIME_CUTOFF:
self.pending[args] = self.bot.loop.call_later(diff, self.execute_queue_event, *args)
self.pending[args] = asyncio.get_event_loop().call_later(diff, self.execute_queue_event, *args)
else:
await self.queue.put((run_at, *args))
@ -965,7 +965,7 @@ class Isolate(commands.Cog):
if self.execute_queue_event(*args):
return
elif diff < QUEUE_TIME_CUTOFF:
self.pending[args] = self.bot.loop.call_later(diff, self.execute_queue_event, *args)
self.pending[args] = asyncio.get_event_loop().call_later(diff, self.execute_queue_event, *args)
return True
await self.queue.put(item)

View file

@ -1015,7 +1015,7 @@ class Punish(commands.Cog):
if diff < 0:
self.execute_queue_event(*args)
elif run_at - time.time() < QUEUE_TIME_CUTOFF:
self.pending[args] = self.bot.loop.call_later(diff, self.execute_queue_event, *args)
self.pending[args] = asyncio.get_event_loop().call_later(diff, self.execute_queue_event, *args)
else:
await self.queue.put((run_at, *args))
@ -1033,7 +1033,7 @@ class Punish(commands.Cog):
if self.execute_queue_event(*args):
return
elif diff < QUEUE_TIME_CUTOFF:
self.pending[args] = self.bot.loop.call_later(diff, self.execute_queue_event, *args)
self.pending[args] = asyncio.get_event_loop().call_later(diff, self.execute_queue_event, *args)
return True
await self.queue.put(item)