#[non_exhaustive]pub struct CallbackQuery {
pub id: String,
pub from_user: User,
pub chat_instance: String,
pub message: Option<Box<MaybeInaccessibleMessage>>,
pub data: Option<String>,
pub inline_message_id: Option<String>,
pub game_short_name: Option<String>,
}Expand description
This object represents an incoming callback query from a callback button in an inline keyboard.
Corresponds to the Bot API
CallbackQuery object.
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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringUnique identifier for this query.
from_user: UserSender of the callback query.
Renamed from Python’s from (reserved keyword).
chat_instance: StringGlobal identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
message: Option<Box<MaybeInaccessibleMessage>>Message sent by the bot with the callback button that originated the query. Note: message content and message date will not be available if the message is too old.
Can be a full Message or an
InaccessibleMessage.
data: Option<String>Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.
inline_message_id: Option<String>Identifier of the message sent via the bot in inline mode, that originated the query.
game_short_name: Option<String>Short name of a Game to be returned, serves as the unique identifier for the game.
Implementations§
Trait Implementations§
Source§impl Clone for CallbackQuery
impl Clone for CallbackQuery
Source§fn clone(&self) -> CallbackQuery
fn clone(&self) -> CallbackQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more