From 33ed83f9c36e7ab13c231d82e54843cc106ab31a Mon Sep 17 00:00:00 2001 From: TheWizardofGauze Date: Sat, 18 May 2024 20:23:32 -0700 Subject: [PATCH] move perror check --- bruhbot/cogs/hd2/hd2.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bruhbot/cogs/hd2/hd2.py b/bruhbot/cogs/hd2/hd2.py index dc71b49..64b7b31 100644 --- a/bruhbot/cogs/hd2/hd2.py +++ b/bruhbot/cogs/hd2/hd2.py @@ -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"] @@ -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..." @@ -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())