Message.reply_ephemeral_text()¶
- async Message.reply_ephemeral_text()[source]¶
Shortcut for method
send_ephemeral_messagewill automatically fill method attributes:chat_id
receiver_id
reply_parameters
The reply goes to whoever sent this message unless receiver_id names someone else, and it is visible only to them.
Example
await message.reply_ephemeral_text("Only you can see this")
- Parameters:
text (
str) – Text of the message to be sent.receiver_id (
int|str, optional) – Unique identifier (int) or username (str) of the user who will receive the message. Defaults to the sender of this message.parse_mode (
ParseMode, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.entities (List of
MessageEntity, optional) – List of special entities that appear in message text, which can be specified instead of parse_mode.reply_markup (
InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply, optional) – Additional interface options.query_id (
int, optional) – Identifier of the guest query to respond to, if this message is a reply to a guest bot query.rich_text (
str|InputRichMessage, optional) – Rich text (Markdown or HTML) to render a styled message. Overrides text.rich_text_parse_mode (
ParseMode, optional) – Parse mode for rich_text. Defaults to Markdown.rich_text_media (List of
InputRichMessageMedia, optional) – Media rich_text refers to throughtg://photo?id=,tg://video?id=ortg://audio?id=links.welcome (
bool, optional) – Pass True to store the message as a welcome message for the chat rather than deliver it once.anchor (
bool, optional) – Pass True to anchor the message to the message it replies to.show_caption_above_media (
bool, optional) – Pass True if the caption must be shown above the message media.protect_content (
bool, optional) – Pass True to protect the content of the message from forwarding and saving.
- Returns:
On success, the sent
Messageis returned.- Raises:
ValueError – In case there is nobody to address the message to.
RPCError – In case of a Telegram RPC error.