Interface SendEphemeralMessage

Sends an ephemeral message which will be received only by one bot in a chat. Currently, only ephemeral bot commands and replies to bot ephemeral messages can be sent using the method. The message is persistent across application restarts only if the message database is used. Returns the sent message. Request type for Tdjson#sendEphemeralMessage.

interface SendEphemeralMessage {
    @type: "sendEphemeralMessage";
    callback_query_id: string;
    chat_id: number;
    input_message_content: InputMessageContent;
    only_preview?: boolean;
    protect_content?: boolean;
    receiver_user_id: number;
    replace_callback_query_message?: boolean;
    reply_markup: ReplyMarkup;
    reply_to: InputMessageReplyTo;
    sending_id: number;
    topic_id: MessageTopic;
}

Properties

@type: "sendEphemeralMessage"
callback_query_id: string

Identifier of the callback query which triggered the message; for bots only.

chat_id: number

Target chat.

input_message_content: InputMessageContent

The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote, inputMessageLocation, inputMessageVenue, inputMessageContact.

only_preview?: boolean

Pass true to get a fake message instead of actually sending them.

protect_content?: boolean

Pass true if the content of the message must be protected from forwarding and saving; for bots only.

receiver_user_id: number

Identifier of the user who will receive the message.

replace_callback_query_message?: boolean

Pass true if the ephemeral message must replace the message from which the callback query originated; for bots only.

reply_markup: ReplyMarkup

Markup for replying to the message; pass null if none; for bots only.

Information about the message to be replied; pass null if none. The message can be an incoming ephemeral message.

sending_id: number

Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.

topic_id: MessageTopic

Topic in which the message will be sent; pass null if none.