telegram.callbackquery module

This module contains an object that represents a Telegram CallbackQuery

class telegram.callbackquery.CallbackQuery(id, from_user, chat_instance, message=None, data=None, inline_message_id=None, game_short_name=None, bot=None, **kwargs)

Bases: telegram.base.TelegramObject

This object represents a Telegram CallbackQuery.

answer(*args, **kwargs)

Shortcut for bot.answerCallbackQuery(update.callback_query.id, *args, **kwargs)

static de_json(data, bot)
Parameters:
Returns:

Return type:

telegram.CallbackQuery

edit_message_caption(*args, **kwargs)

Shortcut for either bot.editMessageCaption(chat_id=update.callback_query.message.chat_id, message_id=update.callback_query.message.message_id, *args, **kwargs) or bot.editMessageCaption(inline_message_id=update.callback_query.inline_message_id, *args, **kwargs)

edit_message_reply_markup(*args, **kwargs)

Shortcut for either bot.editMessageReplyMarkup(chat_id=update.callback_query.message.chat_id, message_id=update.callback_query.message.message_id, *args, **kwargs) or bot.editMessageReplyMarkup(inline_message_id=update.callback_query.inline_message_id, *args, **kwargs)

edit_message_text(*args, **kwargs)

Shortcut for either bot.editMessageText(chat_id=update.callback_query.message.chat_id, message_id=update.callback_query.message.message_id, *args, **kwargs) or bot.editMessageText(inline_message_id=update.callback_query.inline_message_id, *args, **kwargs)

to_dict()
Returns:
Return type:dict