telegram.update module

This module contains an object that represents a Telegram Update.

class telegram.update.Update(update_id, message=None, edited_message=None, inline_query=None, chosen_inline_result=None, callback_query=None, channel_post=None, edited_channel_post=None, **kwargs)

Bases: telegram.base.TelegramObject

This object represents a Telegram Update.

update_id

int – The update’s unique identifier.

message

telegram.Message – New incoming message of any kind - text, photo, sticker, etc.

edited_message

telegram.Message – New version of a message that is known to the bot and was edited

inline_query

telegram.InlineQuery – New incoming inline query.

chosen_inline_result

telegram.ChosenInlineResult – The result of an inline query that was chosen by a user and sent to their chat partner.

callback_query

telegram.CallbackQuery – New incoming callback query.

channel_post

Optional[telegram.Message] – New incoming channel post of any kind - text, photo, sticker, etc.

edited_channel_post

Optional[telegram.Message] – New version of a channel post that is known to the bot and was edited.

Parameters:
static de_json(data, bot)
Parameters:
Returns:

Return type:

telegram.Update