telegram.ChatMemberUpdated#
- class telegram.ChatMemberUpdated(*args, **kwargs)[source]#
Bases:
telegram.TelegramObjectThis object represents changes in the status of a chat member.
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
chat,from_user,date,old_chat_memberandnew_chat_memberare equal.New in version 13.4.
- Parameters
chat (
telegram.Chat) – Chat the user belongs to.from_user (
telegram.User) – Performer of the action, which resulted in the change.date (
datetime.datetime) – Date the change was done in Unix time. Converted todatetime.datetime.old_chat_member (
telegram.ChatMember) – Previous information about the chat member.new_chat_member (
telegram.ChatMember) – New information about the chat member.invite_link (
telegram.ChatInviteLink, optional) – Chat invite link, which was used by the user to join the chat. For joining by invite link events only.
- date[source]#
Date the change was done in Unix time. Converted to
datetime.datetime.- Type
- difference()[source]#
Computes the difference between
old_chat_memberandnew_chat_member.Example
>>> chat_member_updated.difference() {'custom_title': ('old title', 'new title')}
Note
To determine, if the
telegram.ChatMember.userattribute has changed, every attribute of the user will be checked.New in version 13.5.