mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-20 02:26:32 +01:00
Fix keyerror
This commit is contained in:
parent
630c9391ee
commit
5a1c75f8e4
1 changed files with 2 additions and 4 deletions
|
@ -400,10 +400,8 @@ class OtherCog(commands.Cog):
|
||||||
return_when=asyncio.FIRST_COMPLETED,
|
return_when=asyncio.FIRST_COMPLETED,
|
||||||
)
|
)
|
||||||
done_tasks = done
|
done_tasks = done
|
||||||
done = done_tasks or pending
|
|
||||||
done = pending or done_tasks
|
|
||||||
try:
|
try:
|
||||||
done = done.pop()
|
done = done_tasks.pop()
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return await ctx.respond(
|
return await ctx.respond(
|
||||||
"Something went wrong. Try again?\n"
|
"Something went wrong. Try again?\n"
|
||||||
|
@ -418,7 +416,7 @@ class OtherCog(commands.Cog):
|
||||||
|
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
await ctx.edit(content=f"Preparing to screenshot {friendly_url}... (16%)")
|
await ctx.edit(content=f"Preparing to screenshot {friendly_url}... (16%)")
|
||||||
okay = await pending.pop()
|
okay = await (pending or done_tasks).pop()
|
||||||
if okay is not True:
|
if okay is not True:
|
||||||
return await ctx.edit(
|
return await ctx.edit(
|
||||||
content="That domain is blacklisted, doesn't exist, or there was no answer from the DNS server."
|
content="That domain is blacklisted, doesn't exist, or there was no answer from the DNS server."
|
||||||
|
|
Loading…
Reference in a new issue