Class CallbackQuery

java.lang.Object
io.github.natanimn.telebof.types.updates.CallbackQuery
All Implemented Interfaces:
TelegramUpdate

public class CallbackQuery extends Object implements TelegramUpdate
This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
Since:
3 March 2025
Author:
Natanim
  • Field Details

    • id

      private String id
      Unique identifier for this query
    • inlineMessageId

      @SerializedName("inline_message_id") private String inlineMessageId
      Identifier of the message sent via the bot in inline mode, that originated the query.
    • chatInstance

      @SerializedName("chat_instance") private String chatInstance
      Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
    • data

      private String data
      Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.
    • gameShortName

      @SerializedName("game_short_name") private String gameShortName
      Short name of a Game to be returned, serves as the unique identifier for the game
    • from

      private User from
      Sender
    • message

      private Message message
      Message sent by the bot with the callback button that originated the query
  • Constructor Details

    • CallbackQuery

      public CallbackQuery()
  • Method Details

    • getId

      public String getId()
    • getInlineMessageId

      public String getInlineMessageId()
    • getChatInstance

      public String getChatInstance()
    • getData

      public String getData()
    • getGameShortName

      public String getGameShortName()
    • getFrom

      public User getFrom()
    • getMessage

      public Message getMessage()
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object