aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-08-29 18:32:12 +0200
committerGravatar kwzrd <[email protected]>2020-08-29 18:32:12 +0200
commitcf7388ff8490be95f1d677f424e8bec86de0e46a (patch)
tree4f0bed8d0060d01194a33e6ec6f85aa77558c7b8
parentVerification: add helper for stopping tasks (diff)
Verification: stop tasks on suspicious 403
-rw-r--r--bot/cogs/verification.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/cogs/verification.py b/bot/cogs/verification.py
index a013a1b12..107ae1178 100644
--- a/bot/cogs/verification.py
+++ b/bot/cogs/verification.py
@@ -276,7 +276,9 @@ class Verification(Cog):
ping = f"<@&{constants.Roles.admins}>"
await admins_channel.send(
- f"{ping} Aborted updating unverified users due to the following exception:\n```{exception}```",
+ f"{ping} Aborted updating unverified users due to the following exception:\n"
+ f"```{exception}```\n"
+ f"Internal tasks will be stopped.",
allowed_mentions=mention_role(constants.Roles.admins),
)
@@ -305,6 +307,7 @@ class Verification(Cog):
await request(member)
except StopExecution as stop_execution:
await self._alert_admins(stop_execution.reason)
+ self._stop_tasks(gracefully=True) # Gracefully finish current iteration, then stop
break
except discord.HTTPException as http_exc:
bad_statuses.add(http_exc.status)