We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Attachment.save
1 parent 54f6576 commit fb74ffcCopy full SHA for fb74ffc
discord/message.py
@@ -314,7 +314,7 @@ async def save(
314
deleted attachments if too much time has passed, and it does not work
315
on some types of attachments.
316
chunksize: Optional[:class:`int`]
317
- The maximum size of each chunk to process.
+ The maximum size of each chunk to process. Must be a positive non-null integer.
318
319
Returns
320
-------
@@ -336,7 +336,7 @@ async def save(
336
data = await self.read(use_cached=use_cached)
337
338
if isinstance(fp, io.BufferedIOBase):
339
- if chunksize:
+ if chunksize is not None:
340
written = 0
341
async for chunk in data:
342
written += fp.write(chunk)
0 commit comments