1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-11-01 21:02:38 +00:00

Changed all whiles to use bot connection status instead; WIP event loop

This commit is contained in:
Myned 2017-10-13 01:24:57 -04:00
parent a905f3b945
commit 62e95e5188
2 changed files with 3 additions and 3 deletions

View file

@ -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)

View file

@ -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()