mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-30 17:59:55 +03:00
Update chats.py
This commit is contained in:
parent
e9819de123
commit
c24339a8b1
|
@ -1260,6 +1260,8 @@ class ChatMethods:
|
||||||
# Get Banned Permissions of Chat
|
# Get Banned Permissions of Chat
|
||||||
await client.get_permissions(chat)
|
await client.get_permissions(chat)
|
||||||
"""
|
"""
|
||||||
|
entity = await self.get_entity(entity)
|
||||||
|
|
||||||
if not user:
|
if not user:
|
||||||
if isinstance(entity, types.Channel):
|
if isinstance(entity, types.Channel):
|
||||||
FullChat = await self(functions.channels.GetFullChannelRequest(entity))
|
FullChat = await self(functions.channels.GetFullChannelRequest(entity))
|
||||||
|
@ -1382,6 +1384,8 @@ class ChatMethods:
|
||||||
"""
|
"""
|
||||||
Stuff to do with Group Calls, Possible for Administrator and
|
Stuff to do with Group Calls, Possible for Administrator and
|
||||||
Creator.
|
Creator.
|
||||||
|
|
||||||
|
will raise ValueError, if `method` is None or Invalid.
|
||||||
|
|
||||||
Arguments
|
Arguments
|
||||||
method (`str`):
|
method (`str`):
|
||||||
|
@ -1472,25 +1476,23 @@ class ChatMethods:
|
||||||
Call = Call.full_chat.call
|
Call = Call.full_chat.call
|
||||||
|
|
||||||
if method == "edit_title":
|
if method == "edit_title":
|
||||||
return (await self(functions.phone.EditGroupCallTitleRequest(
|
return await self(functions.phone.EditGroupCallTitleRequest(
|
||||||
Call, title=title if title else ""))).updates
|
Call, title=title if title else ""))
|
||||||
|
|
||||||
elif method == "edit_perms":
|
elif method == "edit_perms":
|
||||||
reqs = await self(
|
return await self(
|
||||||
functions.phone.ToggleGroupCallSettingsRequest(
|
functions.phone.ToggleGroupCallSettingsRequest(
|
||||||
reset_invite_hash=reset_invite_hash,
|
reset_invite_hash=reset_invite_hash,
|
||||||
call=Call,
|
call=Call,
|
||||||
join_muted=join_muted))
|
join_muted=join_muted))
|
||||||
return reqs.updates
|
|
||||||
|
|
||||||
elif method == "discard":
|
elif method == "discard":
|
||||||
return (await self(
|
return await self(
|
||||||
functions.phone.DiscardGroupCallRequest(Call))).updates
|
functions.phone.DiscardGroupCallRequest(Call))
|
||||||
|
|
||||||
elif method == "start_schedule":
|
elif method == "start_schedule":
|
||||||
return (await self(
|
return await self(
|
||||||
functions.phone.StartScheduledGroupCallRequest(Call))
|
functions.phone.StartScheduledGroupCallRequest(Call))
|
||||||
).updates
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user