diff options
author | 2020-10-02 19:55:06 +0100 | |
---|---|---|
committer | 2020-10-02 19:55:06 +0100 | |
commit | f7015232947198f2a3d05c680df0da0bfaff4a8e (patch) | |
tree | bd89e9064bbf5422ba57de4395567664992e60ba | |
parent | Changed send_attachments so kwargs could be given and would be passed to send() (diff) |
Add use_cached argument to send_attachments, and change it to default to False
-rw-r--r-- | bot/utils/messages.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/utils/messages.py b/bot/utils/messages.py index c4ac1e360..9fd571a20 100644 --- a/bot/utils/messages.py +++ b/bot/utils/messages.py @@ -57,6 +57,7 @@ async def send_attachments( message: discord.Message, destination: Union[discord.TextChannel, discord.Webhook], link_large: bool = True, + use_cached: bool = False, **kwargs ) -> List[str]: """ @@ -85,7 +86,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, use_cached=True) + await attachment.save(file, use_cached=use_cached) attachment_file = discord.File(file, filename=attachment.filename) if isinstance(destination, discord.TextChannel): |