mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-09 00:14:50 +00:00
pyrofork: Add example to send_paid_media method
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
2e263190a2
commit
d2dd55864c
1 changed files with 13 additions and 1 deletions
|
|
@ -81,10 +81,22 @@ class SendPaidMedia:
|
||||||
|
|
||||||
invert_media (``bool``, *optional*):
|
invert_media (``bool``, *optional*):
|
||||||
Invert the media.
|
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 = []
|
multi_media = []
|
||||||
|
|
||||||
peer = await self.resolve_peer(chat_id)
|
|
||||||
for i in media:
|
for i in media:
|
||||||
if isinstance(i, types.InputMediaPhoto):
|
if isinstance(i, types.InputMediaPhoto):
|
||||||
if isinstance(i.media, str):
|
if isinstance(i.media, str):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue