Skip to content

Commit

Permalink
Update Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
SpEcHiDe committed Feb 23, 2024
1 parent 96dfc42 commit 2b8fe10
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/releases/changes-in-this-fork.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ it can take advantage of new goodies!
| Leaked Scheme layer |
+------------------------+

- `#713 <https://github.com/pyrogram/pyrogram/pull/713>`_
- Removed :obj:`~pyrogram.types.ChatPreview` class.
- Added ``description``, ``accent_color_id``, ``is_verified``, ``is_scam``, ``is_fake``, ``is_public``, ``join_by_request`` attributes to the class :obj:`~pyrogram.types.ChatPreview`.
- Added ``force_full`` parameter to :meth:`~pyrogram.Client.get_chat`.
Expand Down
1 change: 1 addition & 0 deletions docs/source/start/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ to give you a basic idea.
:doc:`use_inline_bots`, "Query an inline bot (as user) and send a result to a chat"
:doc:`bot_keyboards`, "Send normal and inline keyboards using regular bots"
:doc:`raw_updates`, "Handle raw updates (old, should be avoided)"
:doc:`send_voice_message`, "Download audio file and reupload as Voice Message with waveforms"

For more advanced examples, see https://github.com/ColinShark/Pyrogram-Snippets.

Expand Down
19 changes: 19 additions & 0 deletions docs/source/start/examples/send_voice_message.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
send_voice
===========

.. include:: /_includes/usable-by/users-bots.rst

.. code-block:: python
from pyrogram import Client, filters
app = Client("my_account")
@app.on_message(filters.audio)
async def re_upload_as_voice(client, message):
# Downlaod the Voice
o = await message.download()
# Re Upload the Audio as Telegram Voice Message
await message.reply_voice(o, waveform=b'\xff\xbf\xf7\xde\xff\xcf\xbd\xbd\xf7\xfb\xff\xff\xff\xde{\xff?\xf7\xf6\xde\xef\xff\xff\xff{\xef\xfd\xff\xdc\xdb{\xbf\xff\xff\xff\xef\xbd\xf7\xffso\xef\xfd\xfe\xff')
app.run() # Automatically start() and idle()

0 comments on commit 2b8fe10

Please sign in to comment.