diff options
| author | 2019-11-28 09:13:32 +0100 | |
|---|---|---|
| committer | 2019-11-28 09:13:32 +0100 | |
| commit | 1c3220345c7b04956b584ccd072d596b1d790a5d (patch) | |
| tree | 587623ee89d93f348dc623ddd0c496d590e9aef2 | |
| parent | Fix misspelling (diff) | |
Update try/except block in reupload_attachments()
| -rw-r--r-- | bot/cogs/antispam.py | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/bot/cogs/antispam.py b/bot/cogs/antispam.py index 0d3d0c4cc..6444b1f14 100644 --- a/bot/cogs/antispam.py +++ b/bot/cogs/antispam.py @@ -279,8 +279,11 @@ async def reupload_attachments(                  await attachment.save(buffer, use_cached=True)                  reupload: Message = await channel.send(file=File(buffer, filename=attachment.filename))                  out.append(reupload.attachments[0].url) -        except (HTTPException, NotFound): -            log.warning(f"Tried to re-upload attachment {attachment.id}, but it has failed.") +        except HTTPException: +            log.warning( +                f"Tried to re-upload attachment {attachment.filename} " +                f"with ID {attachment.id} from message {message.id}, but it has failed." +            )      return out | 
