diff --git a/pyrogram/client/types/voice.py b/pyrogram/client/types/voice.py index 8abe54eb..51ff32c8 100644 --- a/pyrogram/client/types/voice.py +++ b/pyrogram/client/types/voice.py @@ -32,17 +32,36 @@ class Voice(Object): duration (``int`` ``32-bit``): Duration of the audio in seconds as defined by sender. + thumb (:obj:`PhotoSize `, optional): + Voice thumbnail. + + file_name (``str``, optional): + Voice file name. + mime_type (``str``, optional): MIME type of the file as defined by sender. file_size (``int`` ``32-bit``, optional): File size. + date (``int``, optional): + Date the voice was sent in Unix time. """ ID = 0xb0700009 - def __init__(self, file_id, duration, mime_type=None, file_size=None): + def __init__( + self, + file_id: str, + duration: int, + thumb=None, + file_name: str = None, + mime_type: str = None, + file_size: int = None, + date: int = None): self.file_id = file_id # string + self.thumb = thumb # flags.0?PhotoSize + self.file_name = file_name # flags.1?string + self.mime_type = mime_type # flags.2?string + self.file_size = file_size # flags.3?int + self.date = date # flags.4?int self.duration = duration # int - self.mime_type = mime_type # flags.0?string - self.file_size = file_size # flags.1?int