mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-01 05:04:51 +00:00
pyrofork: Add has_spoiler in get_input_media_from_file_id
This commit is contained in:
parent
361acdbfd7
commit
8f9797f57c
1 changed files with 4 additions and 1 deletions
|
|
@ -54,7 +54,8 @@ async def ainput(prompt: str = "", *, hide: bool = False):
|
|||
def get_input_media_from_file_id(
|
||||
file_id: str,
|
||||
expected_file_type: FileType = None,
|
||||
ttl_seconds: int = None
|
||||
ttl_seconds: int = None,
|
||||
has_spoiler: bool = None
|
||||
) -> Union["raw.types.InputMediaPhoto", "raw.types.InputMediaDocument"]:
|
||||
try:
|
||||
decoded = FileId.decode(file_id)
|
||||
|
|
@ -79,6 +80,7 @@ def get_input_media_from_file_id(
|
|||
access_hash=decoded.access_hash,
|
||||
file_reference=decoded.file_reference
|
||||
),
|
||||
spoiler=has_spoiler,
|
||||
ttl_seconds=ttl_seconds
|
||||
)
|
||||
|
||||
|
|
@ -89,6 +91,7 @@ def get_input_media_from_file_id(
|
|||
access_hash=decoded.access_hash,
|
||||
file_reference=decoded.file_reference
|
||||
),
|
||||
spoiler=has_spoiler,
|
||||
ttl_seconds=ttl_seconds
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue