đ§ send_paid_media
Use this method to send paid media to channel chats. On success, the sent Message is returned.
âī¸ Parameters
chat_id(intorstr): Unique identifier for the target chat or username of the target channel (in the format @channelusername)star_count(int): The number of Telegram Stars that must be paid to buy access to the mediamedia(List of InputPaidMediaPhoto or InputPaidMediaVideo ): A JSON-serialized array describing the media to be sent; up to 10 itemspayload(str) (optional): Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.caption(str) (optional): Media caption, 0-1024 characters after entities parsingparse_mode(Literal) (optional): Mode for parsing entities in the media captioncaption_entities(List of MessageEntity ) (optional): List of special entities that appear in the caption, which can be specified instead of parse_modeshow_caption_above_media(bool) (optional): Pass True, if the caption must be shown above the message mediadisable_notification(bool) (optional): Sends the message silently. Users will receive a notification with no sound.protect_content(bool) (optional): Protects the contents of the sent message from forwarding and savingreply_parameters(ReplyParameters ) (optional): Description of the message to reply toreply_markup(InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply ) (optional): Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the userbusiness_connection_id(str) (optional): Unique identifier of the business connection on behalf of which the message will be sentallow_paid_broadcast(bool) (optional): Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balancedirect_messages_topic_id(int) (optional): Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chatsuggested_post_parameters(SuggestedPostParameters ) (optional): A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
đ˛ Returns
Message
đ Examples
-đĒĢ Required Parameters
await bot.send_paid_media(
chat_id=your_chat_id_here,
star_count=your_star_count_here,
media=your_media_here
)
-đ All Parameters
await bot.send_paid_media(
chat_id=your_chat_id_here,
star_count=your_star_count_here,
media=your_media_here,
payload=your_payload_here,
caption=your_caption_here,
parse_mode=your_parse_mode_here,
caption_entities=your_caption_entities_here,
show_caption_above_media=your_show_caption_above_media_here,
disable_notification=your_disable_notification_here,
protect_content=your_protect_content_here,
reply_parameters=your_reply_parameters_here,
reply_markup=your_reply_markup_here,
business_connection_id=your_business_connection_id_here,
allow_paid_broadcast=your_allow_paid_broadcast_here,
direct_messages_topic_id=your_direct_messages_topic_id_here,
suggested_post_parameters=your_suggested_post_parameters_here
)