pytdbot.handlers.td_updates
- class pytdbot.handlers.td_updates.Updates[source]
Bases:
object
Auto generated TDLib updates
- on_updateAccentColors(filters=None, position=None, timeout=None)[source]
The list of supported accent colors has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateActiveEmojiReactions(filters=None, position=None, timeout=None)[source]
The list of active emoji reactions has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateActiveLiveLocationMessages(filters=None, position=None, timeout=None)[source]
The list of messages with active live location that need to be updated by the application has changed. The list is persistent across application restarts only if the message database is used
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateActiveNotifications(filters=None, position=None, timeout=None)[source]
Contains active notifications that were shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateAgeVerificationParameters(filters=None, position=None, timeout=None)[source]
The parameters for age verification of the current user’s account has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateAnimatedEmojiMessageClicked(filters=None, position=None, timeout=None)[source]
Some animated emoji message was clicked and a big animated sticker must be played if the message is visible on the screen. chatActionWatchingAnimations with the text of the message needs to be sent if the sticker is played
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateAnimationSearchParameters(filters=None, position=None, timeout=None)[source]
The parameters of animation search through getOption("animation_search_bot_username") bot has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateApplicationRecaptchaVerificationRequired(filters=None, position=None, timeout=None)[source]
A request can’t be completed unless reCAPTCHA verification is performed; for official mobile applications only. The method setApplicationVerificationToken must be called once the verification is completed or failed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateApplicationVerificationRequired(filters=None, position=None, timeout=None)[source]
A request can’t be completed unless application verification is performed; for official mobile applications only. The method setApplicationVerificationToken must be called once the verification is completed or failed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateAttachmentMenuBots(filters=None, position=None, timeout=None)[source]
The list of bots added to attachment or side menu has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateAuthorizationState(filters=None, position=None, timeout=None)[source]
The user authorization state has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateAutosaveSettings(filters=None, position=None, timeout=None)[source]
Autosave settings for some type of chats were updated
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateAvailableMessageEffects(filters=None, position=None, timeout=None)[source]
The list of available message effects has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateBasicGroup(filters=None, position=None, timeout=None)[source]
Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateBasicGroupFullInfo(filters=None, position=None, timeout=None)[source]
Some data in basicGroupFullInfo has been changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateBusinessConnection(filters=None, position=None, timeout=None)[source]
A business connection has changed; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateBusinessMessageEdited(filters=None, position=None, timeout=None)[source]
A message in a business account was edited; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateBusinessMessagesDeleted(filters=None, position=None, timeout=None)[source]
Messages in a business account were deleted; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateCall(filters=None, position=None, timeout=None)[source]
New call was created or information about a call was updated
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatAccentColors(filters=None, position=None, timeout=None)[source]
Chat accent colors have changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatAction(filters=None, position=None, timeout=None)[source]
A message sender activity in the chat has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatActionBar(filters=None, position=None, timeout=None)[source]
The chat action bar was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatActiveStories(filters=None, position=None, timeout=None)[source]
The list of active stories posted by a specific chat has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatAddedToList(filters=None, position=None, timeout=None)[source]
A chat was added to a chat list
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatAvailableReactions(filters=None, position=None, timeout=None)[source]
The chat available reactions were changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatBackground(filters=None, position=None, timeout=None)[source]
The chat background was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatBlockList(filters=None, position=None, timeout=None)[source]
A chat was blocked or unblocked
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatBoost(filters=None, position=None, timeout=None)[source]
A chat boost has changed; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatBusinessBotManageBar(filters=None, position=None, timeout=None)[source]
The bar for managing business bot was changed in a chat
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatDefaultDisableNotification(filters=None, position=None, timeout=None)[source]
The value of the default disable_notification parameter, used when a message is sent to the chat, was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatDraftMessage(filters=None, position=None, timeout=None)[source]
A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn’t be applied
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatEmojiStatus(filters=None, position=None, timeout=None)[source]
Chat emoji status has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatFolders(filters=None, position=None, timeout=None)[source]
The list of chat folders or a chat folder has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatHasProtectedContent(filters=None, position=None, timeout=None)[source]
A chat content was allowed or restricted for saving
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatHasScheduledMessages(filters=None, position=None, timeout=None)[source]
A chat’s has_scheduled_messages field has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatIsMarkedAsUnread(filters=None, position=None, timeout=None)[source]
A chat was marked as unread or was read
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatIsTranslatable(filters=None, position=None, timeout=None)[source]
Translation of chat messages was enabled or disabled
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatLastMessage(filters=None, position=None, timeout=None)[source]
The last message of a chat was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatMember(filters=None, position=None, timeout=None)[source]
User rights changed in a chat; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatMessageAutoDeleteTime(filters=None, position=None, timeout=None)[source]
The message auto-delete or self-destruct timer setting for a chat was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatMessageSender(filters=None, position=None, timeout=None)[source]
The message sender that is selected to send messages in a chat has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatNotificationSettings(filters=None, position=None, timeout=None)[source]
Notification settings for a chat were changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatOnlineMemberCount(filters=None, position=None, timeout=None)[source]
The number of online group members has changed. This update with non-zero number of online group members is sent only for currently opened chats. There is no guarantee that it is sent just after the number of online users has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatPendingJoinRequests(filters=None, position=None, timeout=None)[source]
The chat pending join requests were changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatPermissions(filters=None, position=None, timeout=None)[source]
Chat permissions were changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatPhoto(filters=None, position=None, timeout=None)[source]
A chat photo was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatPosition(filters=None, position=None, timeout=None)[source]
The position of a chat in a chat list has changed. An updateChatLastMessage or updateChatDraftMessage update might be sent instead of the update
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatReadInbox(filters=None, position=None, timeout=None)[source]
Incoming messages were read or the number of unread messages has been changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatReadOutbox(filters=None, position=None, timeout=None)[source]
Outgoing messages were read
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatRemovedFromList(filters=None, position=None, timeout=None)[source]
A chat was removed from a chat list
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatReplyMarkup(filters=None, position=None, timeout=None)[source]
The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatRevenueAmount(filters=None, position=None, timeout=None)[source]
The revenue earned from sponsored messages in a chat has changed. If chat revenue screen is opened, then getChatRevenueTransactions may be called to fetch new transactions
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatTheme(filters=None, position=None, timeout=None)[source]
The chat theme was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatTitle(filters=None, position=None, timeout=None)[source]
The title of a chat was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatUnreadMentionCount(filters=None, position=None, timeout=None)[source]
The chat unread_mention_count has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatUnreadReactionCount(filters=None, position=None, timeout=None)[source]
The chat unread_reaction_count has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatVideoChat(filters=None, position=None, timeout=None)[source]
A chat video chat state has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateChatViewAsTopics(filters=None, position=None, timeout=None)[source]
A chat default appearance has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateConnectionState(filters=None, position=None, timeout=None)[source]
The connection state has changed. This update must be used only to show a human-readable description of the connection state
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateContactCloseBirthdays(filters=None, position=None, timeout=None)[source]
The list of contacts that had birthdays recently or will have birthday soon has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateDefaultBackground(filters=None, position=None, timeout=None)[source]
The default background has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateDefaultPaidReactionType(filters=None, position=None, timeout=None)[source]
The type of default paid reaction has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateDefaultReactionType(filters=None, position=None, timeout=None)[source]
The type of default reaction has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateDeleteMessages(filters=None, position=None, timeout=None)[source]
Some messages were deleted
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateDiceEmojis(filters=None, position=None, timeout=None)[source]
The list of supported dice emojis has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateDirectMessagesChatTopic(filters=None, position=None, timeout=None)[source]
Basic information about a topic in a channel direct messages chat administered by the current user has changed. This update is guaranteed to come before the topic identifier is returned to the application
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateEmojiChatThemes(filters=None, position=None, timeout=None)[source]
The list of available emoji chat themes has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateFavoriteStickers(filters=None, position=None, timeout=None)[source]
The list of favorite stickers was updated
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateFile(filters=None, position=None, timeout=None)[source]
Information about a file was updated
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateFileAddedToDownloads(filters=None, position=None, timeout=None)[source]
A file was added to the file download list. This update is sent only after file download list is loaded for the first time
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateFileDownload(filters=None, position=None, timeout=None)[source]
A file download was changed. This update is sent only after file download list is loaded for the first time
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateFileDownloads(filters=None, position=None, timeout=None)[source]
The state of the file download list has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateFileGenerationStart(filters=None, position=None, timeout=None)[source]
The file generation process needs to be started by the application. Use setFileGenerationProgress and finishFileGeneration to generate the file
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateFileGenerationStop(filters=None, position=None, timeout=None)[source]
File generation is no longer needed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateFileRemovedFromDownloads(filters=None, position=None, timeout=None)[source]
A file was removed from the file download list. This update is sent only after file download list is loaded for the first time
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateForumTopic(filters=None, position=None, timeout=None)[source]
Information about a topic in a forum chat was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateForumTopicInfo(filters=None, position=None, timeout=None)[source]
Basic information about a topic in a forum chat was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateFreezeState(filters=None, position=None, timeout=None)[source]
The freeze state of the current user’s account has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateGroupCall(filters=None, position=None, timeout=None)[source]
Information about a group call was updated
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateGroupCallParticipant(filters=None, position=None, timeout=None)[source]
Information about a group call participant was changed. The updates are sent only after the group call is received through getGroupCall and only if the call is joined or being joined
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateGroupCallParticipants(filters=None, position=None, timeout=None)[source]
The list of group call participants that can send and receive encrypted call data has changed; for group calls not bound to a chat only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateGroupCallVerificationState(filters=None, position=None, timeout=None)[source]
The verification state of an encrypted group call has changed; for group calls not bound to a chat only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateHavePendingNotifications(filters=None, position=None, timeout=None)[source]
Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateInstalledStickerSets(filters=None, position=None, timeout=None)[source]
The list of installed sticker sets was updated
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateLanguagePackStrings(filters=None, position=None, timeout=None)[source]
Some language pack strings have been updated
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageContent(filters=None, position=None, timeout=None)[source]
The message content has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageContentOpened(filters=None, position=None, timeout=None)[source]
The message content was opened. Updates voice note messages to "listened", video note messages to "viewed" and starts the self-destruct timer
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageEdited(filters=None, position=None, timeout=None)[source]
A message was edited. Changes in the message content will come in a separate updateMessageContent
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageFactCheck(filters=None, position=None, timeout=None)[source]
A fact-check added to a message was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageInteractionInfo(filters=None, position=None, timeout=None)[source]
The information about interactions with a message has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageIsPinned(filters=None, position=None, timeout=None)[source]
The message pinned state was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageLiveLocationViewed(filters=None, position=None, timeout=None)[source]
A message with a live location was viewed. When the update is received, the application is expected to update the live location
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageMentionRead(filters=None, position=None, timeout=None)[source]
A message with an unread mention was read
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageReaction(filters=None, position=None, timeout=None)[source]
User changed its reactions on a message with public reactions; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageReactions(filters=None, position=None, timeout=None)[source]
Reactions added to a message with anonymous reactions have changed; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageSendAcknowledged(filters=None, position=None, timeout=None)[source]
A request to send a message has reached the Telegram server. This doesn’t mean that the message will be sent successfully. This update is sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageSendFailed(filters=None, position=None, timeout=None)[source]
A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageSendSucceeded(filters=None, position=None, timeout=None)[source]
A message has been successfully sent
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageSuggestedPostInfo(filters=None, position=None, timeout=None)[source]
Information about suggested post of a message was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateMessageUnreadReactions(filters=None, position=None, timeout=None)[source]
The list of unread reactions added to a message was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewBusinessCallbackQuery(filters=None, position=None, timeout=None)[source]
A new incoming callback query from a business message; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewBusinessMessage(filters=None, position=None, timeout=None)[source]
A new message was added to a business account; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewCallSignalingData(filters=None, position=None, timeout=None)[source]
New call signaling data arrived
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewCallbackQuery(filters=None, position=None, timeout=None)[source]
A new incoming callback query; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewChat(filters=None, position=None, timeout=None)[source]
A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewChatJoinRequest(filters=None, position=None, timeout=None)[source]
A user sent a join request to a chat; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewChosenInlineResult(filters=None, position=None, timeout=None)[source]
The user has chosen a result of an inline query; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewCustomEvent(filters=None, position=None, timeout=None)[source]
A new incoming event; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewCustomQuery(filters=None, position=None, timeout=None)[source]
A new incoming query; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewInlineCallbackQuery(filters=None, position=None, timeout=None)[source]
A new incoming callback query from a message sent via a bot; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewInlineQuery(filters=None, position=None, timeout=None)[source]
A new incoming inline query; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewMessage(filters=None, position=None, timeout=None)[source]
A new message was received; can also be an outgoing message
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewPreCheckoutQuery(filters=None, position=None, timeout=None)[source]
A new incoming pre-checkout query; for bots only. Contains full information about a checkout
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNewShippingQuery(filters=None, position=None, timeout=None)[source]
A new incoming shipping query; for bots only. Only for invoices with flexible price
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNotification(filters=None, position=None, timeout=None)[source]
A notification was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateNotificationGroup(filters=None, position=None, timeout=None)[source]
A list of active notifications in a notification group has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateOption(filters=None, position=None, timeout=None)[source]
An option changed its value
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateOwnedStarCount(filters=None, position=None, timeout=None)[source]
The number of Telegram Stars owned by the current user has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateOwnedTonCount(filters=None, position=None, timeout=None)[source]
The number of Toncoins owned by the current user has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updatePaidMediaPurchased(filters=None, position=None, timeout=None)[source]
Paid media were purchased by a user; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updatePoll(filters=None, position=None, timeout=None)[source]
A poll was updated; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updatePollAnswer(filters=None, position=None, timeout=None)[source]
A user changed the answer to a poll; for bots only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateProfileAccentColors(filters=None, position=None, timeout=None)[source]
The list of supported accent colors for user profiles has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateQuickReplyShortcut(filters=None, position=None, timeout=None)[source]
Basic information about a quick reply shortcut has changed. This update is guaranteed to come before the quick shortcut name is returned to the application
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateQuickReplyShortcutDeleted(filters=None, position=None, timeout=None)[source]
A quick reply shortcut and all its messages were deleted
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateQuickReplyShortcutMessages(filters=None, position=None, timeout=None)[source]
The list of quick reply shortcut messages has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateQuickReplyShortcuts(filters=None, position=None, timeout=None)[source]
The list of quick reply shortcuts has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateReactionNotificationSettings(filters=None, position=None, timeout=None)[source]
Notification settings for reactions were updated
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateRecentStickers(filters=None, position=None, timeout=None)[source]
The list of recently used stickers was updated
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateSavedAnimations(filters=None, position=None, timeout=None)[source]
The list of saved animations was updated
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateSavedMessagesTags(filters=None, position=None, timeout=None)[source]
Tags used in Saved Messages or a Saved Messages topic have changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateSavedMessagesTopic(filters=None, position=None, timeout=None)[source]
Basic information about a Saved Messages topic has changed. This update is guaranteed to come before the topic identifier is returned to the application
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateSavedMessagesTopicCount(filters=None, position=None, timeout=None)[source]
Number of Saved Messages topics has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateSavedNotificationSounds(filters=None, position=None, timeout=None)[source]
The list of saved notification sounds was updated. This update may not be sent until information about a notification sound was requested for the first time
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateScopeNotificationSettings(filters=None, position=None, timeout=None)[source]
Notification settings for some type of chats were updated
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateSecretChat(filters=None, position=None, timeout=None)[source]
Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateServiceNotification(filters=None, position=None, timeout=None)[source]
A service notification from the server was received. Upon receiving this the application must show a popup with the content of the notification
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateSpeechRecognitionTrial(filters=None, position=None, timeout=None)[source]
The parameters of speech recognition without Telegram Premium subscription has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateSpeedLimitNotification(filters=None, position=None, timeout=None)[source]
Download or upload file speed for the user was limited, but it can be restored by subscription to Telegram Premium. The notification can be postponed until a being downloaded or uploaded file is visible to the user. Use getOption("premium_download_speedup") or getOption("premium_upload_speedup") to get expected speedup after subscription to Telegram Premium
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateStarRevenueStatus(filters=None, position=None, timeout=None)[source]
The Telegram Star revenue earned by a user or a chat has changed. If Telegram Star transaction screen of the chat is opened, then getStarTransactions may be called to fetch new transactions
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateStickerSet(filters=None, position=None, timeout=None)[source]
A sticker set has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateStory(filters=None, position=None, timeout=None)[source]
A story was changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateStoryDeleted(filters=None, position=None, timeout=None)[source]
A story became inaccessible
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateStoryListChatCount(filters=None, position=None, timeout=None)[source]
Number of chats in a story list has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateStoryPostFailed(filters=None, position=None, timeout=None)[source]
A story failed to post. If the story posting is canceled, then updateStoryDeleted will be received instead of this update
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateStoryPostSucceeded(filters=None, position=None, timeout=None)[source]
A story has been successfully posted
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateStoryStealthMode(filters=None, position=None, timeout=None)[source]
Story stealth mode settings have changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateSuggestedActions(filters=None, position=None, timeout=None)[source]
The list of suggested to the user actions has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateSupergroup(filters=None, position=None, timeout=None)[source]
Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateSupergroupFullInfo(filters=None, position=None, timeout=None)[source]
Some data in supergroupFullInfo has been changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateTermsOfService(filters=None, position=None, timeout=None)[source]
New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason "Decline ToS update"
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateTonRevenueStatus(filters=None, position=None, timeout=None)[source]
The Toncoin revenue earned by the current user has changed. If Toncoin transaction screen of the chat is opened, then getTonTransactions may be called to fetch new transactions
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateTopicMessageCount(filters=None, position=None, timeout=None)[source]
Number of messages in a topic has changed; for Saved Messages and channel direct messages chat topics only
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateTrendingStickerSets(filters=None, position=None, timeout=None)[source]
The list of trending sticker sets was updated or some of them were viewed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateUnconfirmedSession(filters=None, position=None, timeout=None)[source]
The first unconfirmed session has changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateUnreadChatCount(filters=None, position=None, timeout=None)[source]
Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateUnreadMessageCount(filters=None, position=None, timeout=None)[source]
Number of unread messages in a chat list has changed. This update is sent only if the message database is used
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateUser(filters=None, position=None, timeout=None)[source]
Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateUserFullInfo(filters=None, position=None, timeout=None)[source]
Some data in userFullInfo has been changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateUserPrivacySettingRules(filters=None, position=None, timeout=None)[source]
Some privacy setting rules have been changed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateUserStatus(filters=None, position=None, timeout=None)[source]
The user went online or offline
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateVideoPublished(filters=None, position=None, timeout=None)[source]
An automatically scheduled message with video has been successfully sent after conversion
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updateWebAppMessageSent(filters=None, position=None, timeout=None)[source]
A message was sent by an opened Web App, so the Web App needs to be closed
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable
- on_updates(filters=None, position=None, timeout=None)[source]
Contains a list of updates
- Parameters:
filters (
pytdbot.filters.Filter
, optional) – An update filterposition (
int
, optional) – The function position in handlers list. Default isNone
(append)timeout (
float
, optional) – Max execution time for the handler before it timeout. Default isNone
self (Client | None)
- Raises:
TypeError –
- Return type:
Callable