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:
parent
a905f3b945
commit
62e95e5188
2 changed files with 3 additions and 3 deletions
|
@ -154,7 +154,7 @@ class MsG:
|
||||||
await paginator.add_reaction('➡')
|
await paginator.add_reaction('➡')
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
|
||||||
while True:
|
while not self.bot.is_closed():
|
||||||
try:
|
try:
|
||||||
await self.bot.wait_for('reaction_add', check=on_react, timeout=10 * 60)
|
await self.bot.wait_for('reaction_add', check=on_react, timeout=10 * 60)
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ class MsG:
|
||||||
await paginator.add_reaction('➡')
|
await paginator.add_reaction('➡')
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
|
||||||
while True:
|
while not self.bot.is_closed():
|
||||||
try:
|
try:
|
||||||
await self.bot.wait_for('reaction_add', check=on_react, timeout=10 * 60)
|
await self.bot.wait_for('reaction_add', check=on_react, timeout=10 * 60)
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ class Tools:
|
||||||
try:
|
try:
|
||||||
console = await self.generate(ctx)
|
console = await self.generate(ctx)
|
||||||
exception = await self.generate_err(ctx)
|
exception = await self.generate_err(ctx)
|
||||||
while True:
|
while not self.bot.is_closed():
|
||||||
exe = await self.bot.wait_for('message', check=execute)
|
exe = await self.bot.wait_for('message', check=execute)
|
||||||
await exe.delete()
|
await exe.delete()
|
||||||
sys.stdout = io.StringIO()
|
sys.stdout = io.StringIO()
|
||||||
|
|
Loading…
Reference in a new issue