diff --git a/isolate/isolate.py b/isolate/isolate.py index 270d427..3eeb9f0 100644 --- a/isolate/isolate.py +++ b/isolate/isolate.py @@ -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) diff --git a/punish/punish.py b/punish/punish.py index 70862ce..f684812 100644 --- a/punish/punish.py +++ b/punish/punish.py @@ -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)