Skip to content

Commit c29dd9a

Browse files
Added the field is_direct_messages to the classes Chat and ChatFullInfo which can be used to identify supergroups that are used as channel direct messages chats.
1 parent 54b41ed commit c29dd9a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

telebot/types.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,9 @@ class ChatFullInfo(JsonDeserializable):
615615
:param is_forum: Optional. True, if the supergroup chat is a forum (has topics enabled)
616616
:type is_forum: :obj:`bool`
617617

618+
:param is_direct_messages: Optional. True, if the chat is the direct messages chat of a channel
619+
:type is_direct_messages: :obj:`bool`
620+
618621
:param max_reaction_count: Optional. The maximum number of reactions that can be set on a message in the chat
619622
:type max_reaction_count: :obj:`int`
620623

@@ -783,7 +786,7 @@ def __init__(self, id, type, title=None, username=None, first_name=None,
783786
unrestrict_boost_count=None, custom_emoji_sticker_set_name=None, business_intro=None, business_location=None,
784787
business_opening_hours=None, personal_chat=None, birthdate=None,
785788
can_send_paid_media=None,
786-
accepted_gift_types=None, **kwargs):
789+
accepted_gift_types=None, is_direct_messages=None, **kwargs):
787790
self.id: int = id
788791
self.type: str = type
789792
self.title: Optional[str] = title
@@ -829,6 +832,7 @@ def __init__(self, id, type, title=None, username=None, first_name=None,
829832
self.birthdate: Optional[Birthdate] = birthdate
830833
self.can_send_paid_media: Optional[bool] = can_send_paid_media
831834
self.accepted_gift_types: AcceptedGiftTypes = accepted_gift_types
835+
self.is_direct_messages: Optional[bool] = is_direct_messages
832836
@property
833837
def can_send_gift(self) -> bool:
834838
"""

0 commit comments

Comments
 (0)