mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
parent
75fe90005f
commit
18da855dd4
|
@ -1259,7 +1259,7 @@ class ChatMethods:
|
||||||
if isinstance(entity, types.Channel):
|
if isinstance(entity, types.Channel):
|
||||||
FullChat = await self(functions.channels.GetFullChannelRequest(entity))
|
FullChat = await self(functions.channels.GetFullChannelRequest(entity))
|
||||||
elif isinstance(entity, types.Chat):
|
elif isinstance(entity, types.Chat):
|
||||||
FullChat = await self(functions.messages.GetFullChatRequest(entity))
|
FullChat = await self(functions.messages.GetFullChatRequest(entity.id))
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
return FullChat.chats[0].default_banned_rights
|
return FullChat.chats[0].default_banned_rights
|
||||||
|
@ -1276,7 +1276,7 @@ class ChatMethods:
|
||||||
return custom.ParticipantPermissions(participant.participant, False)
|
return custom.ParticipantPermissions(participant.participant, False)
|
||||||
elif helpers._entity_type(entity) == helpers._EntityType.CHAT:
|
elif helpers._entity_type(entity) == helpers._EntityType.CHAT:
|
||||||
chat = await self(functions.messages.GetFullChatRequest(
|
chat = await self(functions.messages.GetFullChatRequest(
|
||||||
entity
|
entity.chat_id
|
||||||
))
|
))
|
||||||
if isinstance(user, types.InputPeerSelf):
|
if isinstance(user, types.InputPeerSelf):
|
||||||
user = await self.get_me(input_peer=True)
|
user = await self.get_me(input_peer=True)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user