X Tutup
Skip to content

Commit 25bcfa9

Browse files
committed
add constants for Chat.type and ChatMember.status
1 parent ff00e21 commit 25bcfa9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

telegram/chat.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ class Chat(TelegramObject):
4242
type (Optional[str]):
4343
"""
4444

45+
PRIVATE = 'private'
46+
GROUP = 'group'
47+
SUPERGROUP = 'supergroup'
48+
CHANNEL = 'channel'
49+
4550
def __init__(self, id, type, **kwargs):
4651
# Required
4752
self.id = int(id)

telegram/chatmember.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ class ChatMember(TelegramObject):
3434
status (str):
3535
"""
3636

37+
CREATOR = 'creator'
38+
ADMINISTRATOR = 'administrator'
39+
MEMBER = 'member'
40+
LEFT = 'left'
41+
KICKED = 'kicked'
42+
3743
def __init__(self, user, status, **kwargs):
3844
# Required
3945
self.user = user

0 commit comments

Comments
 (0)
X Tutup