mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
pyrofork: Add is_auto_translation_enabled field to Chat
Signed-off-by: wulan17 <wulan17@komodos.id>
This commit is contained in:
parent
beed137855
commit
716c6212b2
1 changed files with 6 additions and 0 deletions
|
|
@ -83,6 +83,9 @@ class Chat(Object):
|
|||
is_gifts_available (``bool``, *optional*):
|
||||
True, if star gifts can be received by this chat.
|
||||
|
||||
is_auto_translation_enabled (``bool``, *optional*):
|
||||
True, if automatic translation is enabled in chat.
|
||||
|
||||
title (``str``, *optional*):
|
||||
Title, for supergroups, channels and basic group chats.
|
||||
|
||||
|
|
@ -236,6 +239,7 @@ class Chat(Object):
|
|||
is_paid_reactions_available: bool = None,
|
||||
is_slowmode_enabled: bool = None,
|
||||
is_gifts_available: bool = None,
|
||||
is_auto_translation_enabled: bool = None,
|
||||
title: str = None,
|
||||
username: str = None,
|
||||
first_name: str = None,
|
||||
|
|
@ -290,6 +294,7 @@ class Chat(Object):
|
|||
self.is_paid_reactions_available = is_paid_reactions_available
|
||||
self.is_slowmode_enabled = is_slowmode_enabled
|
||||
self.is_gifts_available = is_gifts_available
|
||||
self.is_auto_translation_enabled = is_auto_translation_enabled
|
||||
self.title = title
|
||||
self.username = username
|
||||
self.first_name = first_name
|
||||
|
|
@ -535,6 +540,7 @@ class Chat(Object):
|
|||
parsed_chat.is_antispam = full_chat.antispam
|
||||
parsed_chat.is_paid_reactions_available = full_chat.paid_reactions_available
|
||||
parsed_chat.is_gifts_available = getattr(full_chat, "stargifts_available", None)
|
||||
parsed_chat.is_auto_translation_enabled = getattr(full_chat, "auto_translation", None)
|
||||
parsed_chat.gifts_count = getattr(full_chat, "stargifts_count", None)
|
||||
parsed_chat.folder_id = getattr(full_chat, "folder_id", None)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue