send_paid_media()#

Client.send_paid_media()#

Use this method to send paid media.

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). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat’s balance. Otherwise, they will be credited to the bot’s balance.

  • star_count (int) – The number of Telegram Stars that must be paid to buy access to the media.

  • media (List of InputPaidMedia) – A list describing the media to be sent; up to 10 items.

  • 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.

  • caption (str, optional) – Media caption, 0-1024 characters after entities parsing.

  • parse_mode (ParseMode, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.

  • caption_entities (List of MessageEntity) – List of special entities that appear in the caption, which can be specified instead of parse_mode.

  • show_caption_above_media (bool, optional) – Pass True, if the caption must be shown above the message media.

  • disable_notification (bool, optional) – Sends the message silently. Users will receive a notification with no sound.

  • protect_content (bool, optional) – Pass True if the content of the message must be protected from forwarding and saving; for bots only.

  • allow_paid_broadcast (bool, optional) – Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots only

  • reply_parameters (ReplyParameters, optional) – Description of the message to reply to

  • business_connection_id (str, optional) – Unique identifier of the business connection on behalf of which the message will be sent.

  • send_as (int | str) – Unique identifier (int) or username (str) of the chat or channel to send the message as. You can use this to send the message on behalf of a chat or channel where you have appropriate permissions. Use the get_send_as_chats() to return the list of message sender identifiers, which can be used to send messages in the chat, This setting applies to the current message and will remain effective for future messages unless explicitly changed. To set this behavior permanently for all messages, use set_send_as_chat().

  • reply_markup (InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply, optional) – Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

  • schedule_date (datetime, optional) – Date when the message will be automatically sent. Pass a datetime object.

Returns:

Message – On success, the sent message is returned.