diff --git a/src/main/cogs/booru.py b/src/main/cogs/booru.py index 9c7a37b..36e2cd3 100644 --- a/src/main/cogs/booru.py +++ b/src/main/cogs/booru.py @@ -154,7 +154,7 @@ class MsG: await paginator.add_reaction('➡') await asyncio.sleep(1) - while True: + while not self.bot.is_closed(): try: await self.bot.wait_for('reaction_add', check=on_react, timeout=10 * 60) @@ -328,7 +328,7 @@ class MsG: await paginator.add_reaction('➡') await asyncio.sleep(1) - while True: + while not self.bot.is_closed(): try: await self.bot.wait_for('reaction_add', check=on_react, timeout=10 * 60) diff --git a/src/main/cogs/owner.py b/src/main/cogs/owner.py index 11fcd24..fddeb8b 100644 --- a/src/main/cogs/owner.py +++ b/src/main/cogs/owner.py @@ -106,7 +106,7 @@ class Tools: try: console = await self.generate(ctx) exception = await self.generate_err(ctx) - while True: + while not self.bot.is_closed(): exe = await self.bot.wait_for('message', check=execute) await exe.delete() sys.stdout = io.StringIO()