mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Pyrofork: Add spoiler support when sending animation, photo, and video using file_id #14
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
acb08eb990
commit
51e5586c74
3 changed files with 3 additions and 0 deletions
|
|
@ -213,6 +213,7 @@ class SendAnimation:
|
|||
)
|
||||
else:
|
||||
media = utils.get_input_media_from_file_id(animation, FileType.ANIMATION)
|
||||
media.spoiler = has_spoiler
|
||||
else:
|
||||
thumb = await self.save_file(thumb)
|
||||
file = await self.save_file(animation, progress=progress, progress_args=progress_args)
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ class SendPhoto:
|
|||
)
|
||||
else:
|
||||
media = utils.get_input_media_from_file_id(photo, FileType.PHOTO, ttl_seconds=ttl_seconds)
|
||||
media.spoiler = has_spoiler
|
||||
else:
|
||||
file = await self.save_file(photo, progress=progress, progress_args=progress_args)
|
||||
media = raw.types.InputMediaUploadedPhoto(
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@ class SendVideo:
|
|||
)
|
||||
else:
|
||||
media = utils.get_input_media_from_file_id(video, FileType.VIDEO, ttl_seconds=ttl_seconds)
|
||||
media.spoiler = has_spoiler
|
||||
else:
|
||||
thumb = await self.save_file(thumb)
|
||||
file = await self.save_file(video, progress=progress, progress_args=progress_args)
|
||||
|
|
|
|||
Loading…
Reference in a new issue