mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user