Added the ability to specify a payload in send_paid_media which is not used currently

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
shriMADhav U k 2024-09-06 16:58:46 +02:00 committed by wulan17
parent e5327d2216
commit 2faae08064
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5

View file

@ -42,7 +42,8 @@ class SendPaidMedia:
disable_notification: bool = None,
schedule_date: datetime = None,
protect_content: bool = None,
invert_media: bool = None
invert_media: bool = None,
payload: str = None
) -> "types.Message":
"""Send paid media.
Only for channels.
@ -83,6 +84,9 @@ class SendPaidMedia:
invert_media (``bool``, *optional*):
Invert the media.
payload (``str``, *optional*):
Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.
Example:
.. code-block:: python
@ -268,7 +272,8 @@ class SendPaidMedia:
peer=await self.resolve_peer(chat_id),
media=raw.types.InputMediaPaidMedia(
stars_amount=stars_amount,
extended_media=multi_media
extended_media=multi_media,
payload=payload
),
silent=disable_notification or None,
random_id=self.rnd_id(),