edit_ephemeral_message_text()¶
- async Client.edit_ephemeral_message_text()¶
Edit the text of an ephemeral message.
Usable by Users Bots- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.receiver_id (
int|str) – Unique identifier (int) or username (str) of the user the ephemeral message was sent to.message_id (
int) – Identifier of the ephemeral message to edit.text (
str, optional) – New text of the message. Required if rich_text is not given.parse_mode (
ParseMode, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes.entities (List of
MessageEntity, optional) – List of special entities that appear in message text, which can be specified instead of parse_mode.rich_text (
str|InputRichMessage, optional) – Rich content to send, as Markdown or HTML text or as a wholeInputRichMessage.rich_text_parse_mode (
ParseMode, optional) – Parse mode for rich_text. Defaults to Markdown. Ignored when rich_text is anInputRichMessage.rich_text_media (List of
InputRichMessageMedia, optional) – Media rich_text refers to throughtg://photo?id=,tg://video?id=ortg://audio?id=links. Ignored when rich_text is anInputRichMessage.rich_message (
InputRichMessage, optional) – Deprecated alias of rich_text.link_preview_options (
LinkPreviewOptions, optional) – Options used for link preview generation for the message.ephemeral.editMessagehas no flag to turn a preview off, so is_disabled has no effect here.reply_markup (
InlineKeyboardMarkup, optional) – An inline keyboard. Pass None to remove the existing reply markup.welcome (
bool, optional) – Pass True when editing a stored welcome message rather than one that was delivered once.
- Returns:
Message– On success, the edited message is returned.
Example
await app.edit_ephemeral_message_text( chat_id, receiver_id, message_id, "New text" )