aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-12-03 20:31:21 -0800
committerGravatar MarkKoz <[email protected]>2019-12-03 20:31:21 -0800
commitc4f80a54cdc02ea150d956d77bd739cf5c9564d6 (patch)
tree4bc9f0af86941f72ba0e826906fb192c5d0a9516
parentUtils: log send_attachments failures instead of raising exceptions (diff)
Utils: have send_attachments save attachments using the cached URL
This makes it more likely to successfully save an attachment after it's been deleted.
-rw-r--r--bot/utils/messages.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/utils/messages.py b/bot/utils/messages.py
index a39521b72..c4e2753e0 100644
--- a/bot/utils/messages.py
+++ b/bot/utils/messages.py
@@ -77,7 +77,7 @@ async def send_attachments(
# but some may get through hence the try-catch.
if attachment.size <= destination.guild.filesize_limit - 512:
with BytesIO() as file:
- await attachment.save(file)
+ await attachment.save(file, use_cached=True)
attachment_file = File(file, filename=attachment.filename)
if isinstance(destination, TextChannel):