Skip to content

Commit

Permalink
Add waveform parameter to send_voice
Browse files Browse the repository at this point in the history
  • Loading branch information
SpEcHiDe committed Feb 10, 2024
1 parent 3a42677 commit 26854da
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pyrogram/methods/messages/send_voice.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ async def send_voice(
"types.ReplyKeyboardRemove",
"types.ForceReply"
] = None,
waveform: bytes = None,
progress: Callable = None,
progress_args: tuple = ()
) -> Optional["types.Message"]:
Expand Down Expand Up @@ -109,6 +110,10 @@ async def send_voice(
Additional interface options. An object for an inline keyboard, custom reply keyboard,
instructions to remove reply keyboard or to force a reply from the user.
waveform (``bytes``, *optional*):
Only for [user-accounts](https://github.com/tdlib/telegram-bot-api/issues/354#issuecomment-1399423438).
Do Not use if you do not know what this is!
progress (``Callable``, *optional*):
Pass a callback function to view the file transmission progress.
The function must take *(current, total)* as positional arguments (look at Other Parameters below for a
Expand Down Expand Up @@ -164,7 +169,8 @@ async def send_voice(
attributes=[
raw.types.DocumentAttributeAudio(
voice=True,
duration=duration
duration=duration,
waveform=waveform
)
],
ttl_seconds=ttl_seconds
Expand All @@ -189,7 +195,8 @@ async def send_voice(
attributes=[
raw.types.DocumentAttributeAudio(
voice=True,
duration=duration
duration=duration,
waveform=waveform
)
],
ttl_seconds=ttl_seconds
Expand Down

0 comments on commit 26854da

Please sign in to comment.