aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-12-15 09:39:58 -0800
committerGravatar MarkKoz <[email protected]>2019-12-15 09:44:53 -0800
commit4cf2166d6dee6a04a055db7e14cf4ece0656213a (patch)
tree17e2c972442d99cecd8b94ba42297f5ca24db431
parentMake setting filter.offensive_msg_delete_days plural (diff)
Filtering: log the status code of caught HTTPException
-rw-r--r--bot/cogs/filtering.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py
index a709fe7cd..4d91432e7 100644
--- a/bot/cogs/filtering.py
+++ b/bot/cogs/filtering.py
@@ -441,10 +441,8 @@ class Filtering(Cog, Scheduler):
f"Tried to delete message {msg['id']}, but the message can't be found "
f"(it has been probably already deleted)."
)
- except HTTPException:
- log.warning(
- f"Failed to delete message {msg['id']}."
- )
+ except HTTPException as e:
+ log.warning(f"Failed to delete message {msg['id']}: status {e.status}")
await self.bot.api_client.delete(f'bot/offensive-messages/{msg["id"]}')
log.info(f"Deleted the offensive message with id {msg['id']}.")