send_paid_media()¶
- Client.send_paid_media()¶
Send paid media. Only for channels.
Usable by Users Bots
- Parameters:¶
chat_id (
int
|str
) – Unique identifier for the target chat or username of the target channel (in the format @channelusername).stars_amount (
int
) – Amount of stars.media (List of
InputMediaAnimation
|InputMediaPhoto
|InputMediaVideo
) – A list of media to send.business_connection_id (
str
, optional) – Unique identifier for the target business connection. for business bots only.caption (
str
, optional) – Media caption, 0-1024 characters.caption_entities (List of
MessageEntity
, optional) – Special entities that appear in the caption, which can be specified instead of parse_mode.parse_mode (
ParseMode
, optional) – Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot’s message.disable_notification (
bool
, optional) – Sends the message silently. Users will receive a notification with no sound.schedule_date (
datetime
, optional) – Date when the message will be automatically sent. Pass adatetime
object.protect_content (
bool
, optional) – Protect content from being forwarded.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
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." )