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