mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-28 08:49:58 +03:00
some fixes
This commit is contained in:
parent
cef9224678
commit
071ee6c9fb
|
@ -25,7 +25,7 @@ you should use :tl:`GetFullUser`:
|
|||
# or even
|
||||
full = await client(GetFullUserRequest('username'))
|
||||
|
||||
bio = full.about
|
||||
bio = full.full_user.about
|
||||
|
||||
|
||||
See :tl:`UserFull` to know what other fields you can access.
|
||||
|
|
|
@ -634,13 +634,8 @@ async def get_permissions(
|
|||
entity = await self.get_entity(entity)
|
||||
|
||||
if not user:
|
||||
if isinstance(entity, _tl.Channel):
|
||||
FullChat = await self(_tl.fn.channels.GetFullChannel(entity))
|
||||
elif isinstance(entity, _tl.Chat):
|
||||
FullChat = await self(_tl.fn.messages.GetFullChat(entity))
|
||||
else:
|
||||
return
|
||||
return FullChat.chats[0].default_banned_rights
|
||||
if helpers._entity_type(entity) != helpers._EntityType.USER:
|
||||
return entity.default_banned_rights
|
||||
|
||||
entity = await self.get_input_entity(entity)
|
||||
user = await self.get_input_entity(user)
|
||||
|
|
Loading…
Reference in New Issue
Block a user