mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Added the field via_chat_folder_invite_link to the class ChatMemberUpdated.
This commit is contained in:
parent
966b451869
commit
d6f4987197
@ -237,6 +237,9 @@ class ChatMemberUpdated(JsonDeserializable):
|
||||
link events only.
|
||||
:type invite_link: :class:`telebot.types.ChatInviteLink`
|
||||
|
||||
:param via_chat_folder_invite_link: Optional. True, if the user joined the chat via a chat folder invite link
|
||||
:type via_chat_folder_invite_link: :obj:`bool`
|
||||
|
||||
:return: Instance of the class
|
||||
:rtype: :class:`telebot.types.ChatMemberUpdated`
|
||||
"""
|
||||
@ -251,13 +254,15 @@ class ChatMemberUpdated(JsonDeserializable):
|
||||
obj['invite_link'] = ChatInviteLink.de_json(obj.get('invite_link'))
|
||||
return cls(**obj)
|
||||
|
||||
def __init__(self, chat, from_user, date, old_chat_member, new_chat_member, invite_link=None, **kwargs):
|
||||
def __init__(self, chat, from_user, date, old_chat_member, new_chat_member, invite_link=None, via_chat_folder_invite_link=None,
|
||||
**kwargs):
|
||||
self.chat: Chat = chat
|
||||
self.from_user: User = from_user
|
||||
self.date: int = date
|
||||
self.old_chat_member: ChatMember = old_chat_member
|
||||
self.new_chat_member: ChatMember = new_chat_member
|
||||
self.invite_link: Optional[ChatInviteLink] = invite_link
|
||||
self.via_chat_folder_invite_link: Optional[bool] = via_chat_folder_invite_link
|
||||
|
||||
@property
|
||||
def difference(self) -> Dict[str, List]:
|
||||
|
Loading…
Reference in New Issue
Block a user