diff options
| author | 2020-08-29 18:32:12 +0200 | |
|---|---|---|
| committer | 2020-08-29 18:32:12 +0200 | |
| commit | cf7388ff8490be95f1d677f424e8bec86de0e46a (patch) | |
| tree | 4f0bed8d0060d01194a33e6ec6f85aa77558c7b8 | |
| parent | Verification: add helper for stopping tasks (diff) | |
Verification: stop tasks on suspicious 403
| -rw-r--r-- | bot/cogs/verification.py | 5 |
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) |