diff --git a/compiler/api/compiler.py b/compiler/api/compiler.py index aa5714ec..3b6dbae7 100644 --- a/compiler/api/compiler.py +++ b/compiler/api/compiler.py @@ -506,6 +506,7 @@ def start(): f.write("\n 0xb0700027: \"pyrogram.client.types.Photo\",") f.write("\n 0xb0700028: \"pyrogram.client.types.Dialog\",") f.write("\n 0xb0700029: \"pyrogram.client.types.Dialogs\",") + f.write("\n 0xb0700030: \"pyrogram.client.types.ChatMembers\",") f.write("\n}\n") diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py index c151ac4a..29ad17ef 100644 --- a/pyrogram/__init__.py +++ b/pyrogram/__init__.py @@ -27,7 +27,7 @@ __version__ = "0.7.6dev1" from .api.errors import Error from .client.types import ( - Audio, Chat, ChatMember, ChatPhoto, Contact, Document, InputMediaPhoto, + Audio, Chat, ChatMember, ChatMembers, ChatPhoto, Contact, Document, InputMediaPhoto, InputMediaVideo, InputPhoneContact, Location, Message, MessageEntity, Dialog, Dialogs, Photo, PhotoSize, Sticker, Update, User, UserProfilePhotos, Venue, GIF, Video, VideoNote, Voice, CallbackQuery, Messages diff --git a/pyrogram/client/types/__init__.py b/pyrogram/client/types/__init__.py index 3c569324..d99090ef 100644 --- a/pyrogram/client/types/__init__.py +++ b/pyrogram/client/types/__init__.py @@ -20,6 +20,7 @@ from .audio import Audio from .callback_query import CallbackQuery from .chat import Chat from .chat_member import ChatMember +from .chat_members import ChatMembers from .chat_photo import ChatPhoto from .contact import Contact from .dialog import Dialog diff --git a/pyrogram/client/types/chat_members.py b/pyrogram/client/types/chat_members.py new file mode 100644 index 00000000..5557d161 --- /dev/null +++ b/pyrogram/client/types/chat_members.py @@ -0,0 +1,27 @@ +# Pyrogram - Telegram MTProto API Client Library for Python +# Copyright (C) 2017-2018 Dan Tès +# +# This file is part of Pyrogram. +# +# Pyrogram is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Pyrogram is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Pyrogram. If not, see . + +from pyrogram.api.core import Object + + +class ChatMembers(Object): + ID = 0xb0700030 + + def __init__(self, total_count: int, chat_members: list): + self.total_count = total_count + self.chat_members = chat_members