Add new features from new layer (#3676)

Updated some documentation regarding raw API.
get_permissions has been adjusted.
Expose more parameters when sending messages.
Update chat action.
Support sending spoilers.
Update buttons.
This commit is contained in:
Devesh Pal
2022-01-24 17:45:02 +05:30
committed by GitHub
parent a25f019964
commit 539e3cb808
11 changed files with 88 additions and 23 deletions

View File

@@ -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)