Class TdApi.SendEphemeralMessage

Enclosing class:
TdApi

public static class TdApi.SendEphemeralMessage extends TdApi.Function<TdApi.Message>
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.

Returns Message

  • Field Details

    • chatId

      public long chatId
      Target chat.
    • topicId

      public TdApi.MessageTopic topicId
      Topic in which the message will be sent; pass null if none.
    • receiverUserId

      public long receiverUserId
      Identifier of the user who will receive the message.
    • callbackQueryId

      public long callbackQueryId
      Identifier of the callback query which triggered the message; for bots only.
    • replyTo

      public TdApi.InputMessageReplyTo replyTo
      Information about the message to be replied; pass null if none. The message can be an incoming ephemeral message.
    • sendingId

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

      public boolean onlyPreview
      Pass true to get a fake message instead of actually sending them.
    • replyMarkup

      public TdApi.ReplyMarkup replyMarkup
      Markup for replying to the message; pass null if none; for bots only.
    • inputMessageContent

      public TdApi.InputMessageContent inputMessageContent
      The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote, inputMessageLocation, inputMessageVenue, inputMessageContact.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • SendEphemeralMessage

      public SendEphemeralMessage()
      Default constructor for a function, which 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.

      Returns Message

    • SendEphemeralMessage

      public SendEphemeralMessage(long chatId, TdApi.MessageTopic topicId, long receiverUserId, long callbackQueryId, TdApi.InputMessageReplyTo replyTo, int sendingId, boolean onlyPreview, TdApi.ReplyMarkup replyMarkup, TdApi.InputMessageContent inputMessageContent)
      Creates a function, which 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.

      Returns Message

      Parameters:
      chatId - Target chat.
      topicId - Topic in which the message will be sent; pass null if none.
      receiverUserId - Identifier of the user who will receive the message.
      callbackQueryId - Identifier of the callback query which triggered the message; for bots only.
      replyTo - Information about the message to be replied; pass null if none. The message can be an incoming ephemeral message.
      sendingId - Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.
      onlyPreview - Pass true to get a fake message instead of actually sending them.
      replyMarkup - Markup for replying to the message; pass null if none; for bots only.
      inputMessageContent - The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote, inputMessageLocation, inputMessageVenue, inputMessageContact.
  • Method Details

    • getConstructor

      public int getConstructor()
      Description copied from class: TdApi.Object
      Returns an identifier uniquely determining type of the object.
      Specified by:
      getConstructor in class TdApi.Object
      Returns:
      this.CONSTRUCTOR