mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-16 02:13:18 +12:00
more fixes, removing bot.loop
This commit is contained in:
parent
5eabe3ae57
commit
3af5dfbc8d
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue