send_live_photo()¶
- async Client.send_live_photo()¶
Send a live photo, a still image paired with the short video it was taken with.
Usable by Users Bots- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.live_photo (
str|BinaryIO) – Video part of the live photo, as a local path or a file-like object.photo (
str|BinaryIO) – Still part of the live photo, as a local path or a file-like object.caption (
str, optional) – Caption of the live photo, 0-1024 characters.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, optional) – List of special entities that appear in the caption, which can be specified instead of parse_mode.has_spoiler (
bool, optional) – Pass True if the live photo needs to be covered with a spoiler animation.width (
int, optional) – Width of the video part.height (
int, optional) – Height of the video part.disable_notification (
bool, optional) – Sends the message silently. Users will receive a notification with no sound.message_thread_id (
int, optional) – Unique identifier for the target message thread (topic) of the forum.direct_messages_topic_id (
int, optional) – Unique identifier of the direct messages topic.effect_id (
int, optional) – Unique identifier of the effect to apply to the message.show_caption_above_media (
bool, optional) – Pass True, if the caption must be shown above the message media.reply_parameters (
ReplyParameters, optional) – Describes reply parameters for the message that is being sent.schedule_date (
datetime, optional) – Date when the message will be automatically sent.repeat_period (
int, optional) – Period after which the message will be sent again in seconds.protect_content (
bool, optional) – Protects the contents of the sent message from forwarding and saving.business_connection_id (
str, optional) – Unique identifier of the business connection.allow_paid_broadcast (
bool, optional) – Pay to skip the broadcast flood limit.paid_message_star_count (
int, optional) – The number of Telegram Stars the user agreed to pay to send the message.suggested_post_parameters (
SuggestedPostParameters, optional) – Parameters of the suggested post.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.ephemeral_message_parameters (
EphemeralMessageParameters, optional) – Parameters of the ephemeral message to send.progress (
Callable, optional) – Pass a callback function to view the file transmission progress.progress_args (
tuple, optional) – Extra custom arguments for the progress callback function.
- Returns:
Message|None– On success, the sent message is returned.
Example
await app.send_live_photo(chat_id, "clip.mp4", "still.jpg")