mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-30 17:59:55 +03:00
commit
This commit is contained in:
parent
267519f8f0
commit
e9819de123
|
@ -162,7 +162,7 @@ class _ParticipantsIter(RequestIter):
|
||||||
|
|
||||||
users = {user.id: user for user in full.users}
|
users = {user.id: user for user in full.users}
|
||||||
for participant in full.full_chat.participants.participants:
|
for participant in full.full_chat.participants.participants:
|
||||||
if isinstance(participant, types.ChannelParticipantsBanned):
|
if isinstance(participant, types.ChannelParticipantBanned):
|
||||||
user_id = participant.peer.user_id
|
user_id = participant.peer.user_id
|
||||||
else:
|
else:
|
||||||
user_id = participant.user_id
|
user_id = participant.user_id
|
||||||
|
@ -212,7 +212,7 @@ class _ParticipantsIter(RequestIter):
|
||||||
users = {user.id: user for user in participants.users}
|
users = {user.id: user for user in participants.users}
|
||||||
for participant in participants.participants:
|
for participant in participants.participants:
|
||||||
|
|
||||||
if isinstance(participant, types.ChannelParticipantsBanned):
|
if isinstance(participant, types.ChannelParticipantBanned):
|
||||||
user_id = participant.peer.user_id
|
user_id = participant.peer.user_id
|
||||||
else:
|
else:
|
||||||
user_id = participant.user_id
|
user_id = participant.user_id
|
||||||
|
@ -511,7 +511,7 @@ class ChatMethods:
|
||||||
await client.get_participant(chat, user)
|
await client.get_participant(chat, user)
|
||||||
"""
|
"""
|
||||||
chat = await self.get_input_entity(chat)
|
chat = await self.get_input_entity(chat)
|
||||||
user = await self.get_input_entity(user)
|
user = await self.get_input_entity(entity)
|
||||||
return await self(functions.channels.GetParticipantRequest(
|
return await self(functions.channels.GetParticipantRequest(
|
||||||
channel=chat,
|
channel=chat,
|
||||||
participant=user)
|
participant=user)
|
||||||
|
@ -1260,7 +1260,6 @@ class ChatMethods:
|
||||||
# Get Banned Permissions of Chat
|
# Get Banned Permissions of Chat
|
||||||
await client.get_permissions(chat)
|
await client.get_permissions(chat)
|
||||||
"""
|
"""
|
||||||
entity = await self.get_input_entity(entity)
|
|
||||||
if not user:
|
if not user:
|
||||||
if isinstance(entity, types.Channel):
|
if isinstance(entity, types.Channel):
|
||||||
FullChat = await self(functions.channels.GetFullChannelRequest(entity))
|
FullChat = await self(functions.channels.GetFullChannelRequest(entity))
|
||||||
|
@ -1269,6 +1268,8 @@ class ChatMethods:
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
return FullChat.chats[0].default_banned_rights
|
return FullChat.chats[0].default_banned_rights
|
||||||
|
|
||||||
|
entity = await self.get_input_entity(entity)
|
||||||
user = await self.get_input_entity(user)
|
user = await self.get_input_entity(user)
|
||||||
if helpers._entity_type(user) != helpers._EntityType.USER:
|
if helpers._entity_type(user) != helpers._EntityType.USER:
|
||||||
raise ValueError('You must pass a user entity')
|
raise ValueError('You must pass a user entity')
|
||||||
|
@ -1464,7 +1465,7 @@ class ChatMethods:
|
||||||
try:
|
try:
|
||||||
Call = await self(
|
Call = await self(
|
||||||
functions.messages.GetFullChatRequest(entity))
|
functions.messages.GetFullChatRequest(entity))
|
||||||
except errors.rpcerrorslist.ChatIdInvalidError:
|
except errors.rpcerrorlist.ChatIdInvalidError:
|
||||||
Call = await self(
|
Call = await self(
|
||||||
functions.channels.GetFullChannelRequest(entity))
|
functions.channels.GetFullChannelRequest(entity))
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@ chats.ChatMethods,edit_admin,channels.editAdmin messages.editChatAdmin
|
||||||
chats.ChatMethods,edit_permissions,channels.editBanned messages.editChatDefaultBannedRights
|
chats.ChatMethods,edit_permissions,channels.editBanned messages.editChatDefaultBannedRights
|
||||||
chats.ChatMethods,iter_participants,channels.getParticipants
|
chats.ChatMethods,iter_participants,channels.getParticipants
|
||||||
chats.ChatMethods,iter_admin_log,channels.getAdminLog
|
chats.ChatMethods,iter_admin_log,channels.getAdminLog
|
||||||
|
chats.ChatMethods,get_participant, channels.getParticipant
|
||||||
|
chats.ChatMethods,modify_groupcall, phone.createGroupCall phone.discardGroupCall phone.toggleGroupCallSettings phone.startScheduledGroupCall phone.editGroupCallTitle
|
||||||
dialogs.DialogMethods,iter_dialogs,messages.getDialogs
|
dialogs.DialogMethods,iter_dialogs,messages.getDialogs
|
||||||
dialogs.DialogMethods,iter_drafts,messages.getAllDrafts
|
dialogs.DialogMethods,iter_drafts,messages.getAllDrafts
|
||||||
dialogs.DialogMethods,edit_folder,folders.deleteFolder folders.editPeerFolders
|
dialogs.DialogMethods,edit_folder,folders.deleteFolder folders.editPeerFolders
|
||||||
|
|
|
Loading…
Reference in New Issue
Block a user