Documentation - v0.31.0
    Preparing search index...

    Function sendEphemeralMessage

    • Send an ephemeral message — a message that is only visible to a single user in a chat and is not persisted in the chat history.

      Parameters

      • client: ITelegramClient
      • chatId: InputPeerLike

        ID of the chat to send the message to

      • receiverId: InputPeerLike

        ID of the user the message should be visible to

      • text: InputText

        Text of the message

      • Optionalparams: {
            media?: InputMediaLike;
            queryId?: Long;
            replyMarkup?: ReplyMarkup;
            replyTo?: number;
            replyToEphemeral?: number;
            shouldDispatch?: true;
        }
        • Optionalmedia?: InputMediaLike

          Media to be attached to the message

        • OptionalqueryId?: Long

          For guest chat bots, ID of the query that this message is sent in response to

        • OptionalreplyMarkup?: ReplyMarkup

          Reply markup to be attached to the message

        • OptionalreplyTo?: number

          Message to reply to

        • OptionalreplyToEphemeral?: number

          Ephemeral message to reply to

        • OptionalshouldDispatch?: true

          Whether to dispatch the returned updates to the client's update handler.

      Returns Promise<EphemeralMessage>