TelegramEx.Types.CallbackQuery (TelegramEx v1.3.0)

Copy Markdown View Source

Struct representing a Telegram CallbackQuery object.

A callback query is created when a user presses an inline keyboard button. It contains information about the button pressed and the message it was attached to.

Fields

  • :id - Unique identifier for the callback query
  • :from - User who triggered the callback (map with string keys)
  • :message - The TelegramEx.Types.Message the callback was attached to
  • :inline_message_id - Identifier of the inline message (if applicable)
  • :chat_instance - Global identifier for the chat
  • :data - Data associated with the callback button
  • :message_thread_id - Thread ID for forum chats (if applicable)

Summary

Types

t()

CallbackQuery struct type.

Functions

Converts a raw Telegram API callback query map to a CallbackQuery struct.

Types

t()

@type t() :: %TelegramEx.Types.CallbackQuery{
  chat_instance: String.t(),
  data: String.t(),
  from: map(),
  id: String.t(),
  inline_message_id: String.t() | nil,
  message: TelegramEx.Types.Message.t() | nil,
  message_thread_id: integer() | nil
}

CallbackQuery struct type.

Contains all fields from a Telegram callback query update.

Functions

from_map(map)

@spec from_map(map()) :: t()

Converts a raw Telegram API callback query map to a CallbackQuery struct.