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.TelegramObjectThis 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: - update_id (int) –
- message (Optional[
telegram.Message]) – - edited_message (Optional[
telegram.Message]) – - inline_query (Optional[
telegram.InlineQuery]) – - chosen_inline_result (Optional[
telegram.ChosenInlineResult]) – - callback_query (Optional[
telegram.CallbackQuery]) – - channel_post (Optional[
telegram.Message]) – - edited_channel_post (Optional[
telegram.Message]) – - **kwargs – Arbitrary keyword arguments.
-
static
de_json(data, bot)¶ Parameters: - data (dict) –
- bot (telegram.Bot) –
Returns: Return type:
-