pyrofork: Add example to send_paid_media method

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
wulan17 2024-07-01 18:54:27 +07:00
parent 2e263190a2
commit d2dd55864c
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5

View file

@ -81,10 +81,22 @@ class SendPaidMedia:
invert_media (``bool``, *optional*):
Invert the media.
Example:
.. code-block:: python
app.send_paid_media(
chat_id="pyrogram",
stars_amount=100,
media=[
types.InputMediaPhoto("/path/to/photo.jpg"),
types.InputMediaVideo("video_file_id")
],
caption="This is a paid media message."
)
"""
multi_media = []
peer = await self.resolve_peer(chat_id)
for i in media:
if isinstance(i, types.InputMediaPhoto):
if isinstance(i.media, str):