diff options
| author | 2019-12-22 14:25:36 -0800 | |
|---|---|---|
| committer | 2019-12-22 14:25:36 -0800 | |
| commit | 9f3efb023c4bed8987f2b90454462ed37cdbb597 (patch) | |
| tree | 747d143ff49bde6e69966efc2f8dcfdf1649a171 | |
| parent | Catch HTTPException in fetching, only fetch if isn't User or Member (diff) | |
Remove unreachable break in post_infraction loop
* Show the user in the post_infraction error log message
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/moderation/utils.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bot/cogs/moderation/utils.py b/bot/cogs/moderation/utils.py index 6c28d8db5..160ced501 100644 --- a/bot/cogs/moderation/utils.py +++ b/bot/cogs/moderation/utils.py @@ -96,11 +96,9 @@ async def post_infraction( if not should_post_user or await post_user(ctx, user) is None: return else: - log.exception("An unexpected ResponseCodeError occurred while adding an infraction:") + log.exception(f"Unexpected error while adding an infraction for {user}:") await ctx.send(":x: There was an error adding the infraction.") return - else: - break async def has_active_infraction(ctx: Context, user: MemberObject, infr_type: str) -> bool: |