Keep description in Attachment.to_file

This commit is contained in:
Jonah Lawrence 2022-03-30 22:29:34 -06:00 committed by GitHub
parent 06c257760b
commit 1372ef407c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -340,7 +340,7 @@ class Attachment(Hashable):
"""
data = await self.read(use_cached=use_cached)
return File(io.BytesIO(data), filename=self.filename, spoiler=spoiler)
return File(io.BytesIO(data), filename=self.filename, description=self.description, spoiler=spoiler)
def to_dict(self) -> AttachmentPayload:
result: AttachmentPayload = {