Skip to content

Commit

Permalink
move perror check
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWizardofGauze committed May 19, 2024
1 parent b2ffdaa commit 33ed83f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions bruhbot/cogs/hd2/hd2.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,10 @@ async def embed(
perror = True
await asyncio.sleep(15)
continue
if perror is True and perror is not None:
await interaction.followup.send(
f"presponse status code {presponse.status_code}"
)
elif task["type"] == 13: # hold planets
pindex = []
prog = aj["progress"]
Expand All @@ -704,6 +708,10 @@ async def embed(
perror = True
await asyncio.sleep(15)
continue
if perror is True and perror is not None:
await interaction.followup.send(
f"presponse status code {presponse.status_code}"
)
else:
await interaction.followup.send(
f"Unknown task type {str(task['type'])}. Aborting..."
Expand Down Expand Up @@ -759,10 +767,6 @@ async def embed(
await interaction.followup.send(
f"aresponse status code {aresponse.status_code}"
)
if perror is True and perror is not None:
await interaction.followup.send(
f"presponse status code {presponse.status_code}"
)
except Exception:
await interaction.followup.send("Error logged in HD2.")
ErrorLogger.run(traceback.format_exc())
Expand Down

0 comments on commit 33ed83f

Please sign in to comment.