Skip to content

Commit

Permalink
Add ChatMemberStatus hints
Browse files Browse the repository at this point in the history
  • Loading branch information
z44d committed Oct 9, 2024
1 parent 9e31806 commit c0581e1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions tgram/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@

ParseMode = _Literal["Markdown", "MarkdownV2", "HTML"]
ChatType = _Literal["private", "group", "supergroup", "channel"]
ChatMemberStatus = _Literal[
"creator", "administrator", "member", "restricted", "left", "kicked"
]
MessageEntityType = _Literal[
"mention",
"hashtag",
Expand Down
2 changes: 1 addition & 1 deletion tgram/types/_chat_member_administrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ChatMemberAdministrator(Type_):

def __init__(
self,
status: "str" = None,
status: "tgram.types.ChatMemberStatus" = None,
user: "tgram.types.User" = None,
can_be_edited: "bool" = None,
is_anonymous: "bool" = None,
Expand Down
2 changes: 1 addition & 1 deletion tgram/types/_chat_member_banned.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ChatMemberBanned(Type_):

def __init__(
self,
status: "str" = None,
status: "tgram.types.ChatMemberStatus" = None,
user: "tgram.types.User" = None,
until_date: "int" = None,
me: "tgram.TgBot" = None,
Expand Down
2 changes: 1 addition & 1 deletion tgram/types/_chat_member_left.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ChatMemberLeft(Type_):

def __init__(
self,
status: "str" = None,
status: "tgram.types.ChatMemberStatus" = None,
user: "tgram.types.User" = None,
me: "tgram.TgBot" = None,
json: "dict" = None,
Expand Down
2 changes: 1 addition & 1 deletion tgram/types/_chat_member_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ChatMemberMember(Type_):

def __init__(
self,
status: "str" = None,
status: "tgram.types.ChatMemberStatus" = None,
user: "tgram.types.User" = None,
until_date: "int" = None,
me: "tgram.TgBot" = None,
Expand Down
2 changes: 1 addition & 1 deletion tgram/types/_chat_member_owner.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ChatMemberOwner(Type_):

def __init__(
self,
status: "str" = None,
status: "tgram.types.ChatMemberStatus" = None,
user: "tgram.types.User" = None,
is_anonymous: "bool" = None,
custom_title: "str" = None,
Expand Down
2 changes: 1 addition & 1 deletion tgram/types/_chat_member_restricted.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ChatMemberRestricted(Type_):

def __init__(
self,
status: "str" = None,
status: "tgram.types.ChatMemberStatus" = None,
user: "tgram.types.User" = None,
is_member: "bool" = None,
can_send_messages: "bool" = None,
Expand Down

0 comments on commit c0581e1

Please sign in to comment.