Skip to content

Commit 960280b

Browse files
committed
Add new ChatMembers type
1 parent d94139b commit 960280b

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

compiler/api/compiler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ def start():
506506
f.write("\n 0xb0700027: \"pyrogram.client.types.Photo\",")
507507
f.write("\n 0xb0700028: \"pyrogram.client.types.Dialog\",")
508508
f.write("\n 0xb0700029: \"pyrogram.client.types.Dialogs\",")
509+
f.write("\n 0xb0700030: \"pyrogram.client.types.ChatMembers\",")
509510

510511
f.write("\n}\n")
511512

pyrogram/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
from .api.errors import Error
2929
from .client.types import (
30-
Audio, Chat, ChatMember, ChatPhoto, Contact, Document, InputMediaPhoto,
30+
Audio, Chat, ChatMember, ChatMembers, ChatPhoto, Contact, Document, InputMediaPhoto,
3131
InputMediaVideo, InputPhoneContact, Location, Message, MessageEntity,
3232
Dialog, Dialogs, Photo, PhotoSize, Sticker, Update, User, UserProfilePhotos,
3333
Venue, GIF, Video, VideoNote, Voice, CallbackQuery, Messages

pyrogram/client/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from .callback_query import CallbackQuery
2121
from .chat import Chat
2222
from .chat_member import ChatMember
23+
from .chat_members import ChatMembers
2324
from .chat_photo import ChatPhoto
2425
from .contact import Contact
2526
from .dialog import Dialog
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Pyrogram - Telegram MTProto API Client Library for Python
2+
# Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>
3+
#
4+
# This file is part of Pyrogram.
5+
#
6+
# Pyrogram is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU Lesser General Public License as published
8+
# by the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# Pyrogram is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU Lesser General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU Lesser General Public License
17+
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
18+
19+
from pyrogram.api.core import Object
20+
21+
22+
class ChatMembers(Object):
23+
ID = 0xb0700030
24+
25+
def __init__(self, total_count: int, chat_members: list):
26+
self.total_count = total_count
27+
self.chat_members = chat_members

0 commit comments

Comments
 (0)