This commit is contained in:
New-dev0 2021-06-10 20:23:49 +05:30
parent 978c5874e2
commit c48e8b98cc
2 changed files with 25 additions and 2 deletions

View File

@ -1313,4 +1313,27 @@ class ChatMethods:
finally: finally:
await self._return_exported_sender(sender) await self._return_exported_sender(sender)
# endregion async def change_groupcall(method:str,
chat,
title:str=None):
if not method:
return
if method == "create":
InputPeer = utils.get_input_peer(chat)
return await self(
functions.phone.CreateGroupCallRequest(peer=InputPeer)
)
try:
Call = (await self(functions.messages.GetFullChatRequest(chat))).full_chat.call
except errors.rpcerrorlist.ChatIdInvalidError:
Call = (await self(functions.channels.GetFullChannelRequest(chat))).full_chat.call
if method == "edit_title":
return await self(functions.phone.EditGroupCallTitleRequest(Call, title=title))
elif method == "discard":
return await self(functions.phone.DiscardGroupCallRequest(call))
else:
self._log[__name__].info("Invalid Method Invoked while using change_groupcall")
# endregion

View File

@ -269,7 +269,7 @@ class DownloadMethods:
photo = entity.photo photo = entity.photo
if isinstance(photo, (types.UserProfilePhoto, types.)): if isinstance(photo, (types.UserProfilePhoto, types.ChatPhoto)):
dc_id = photo.dc_id dc_id = photo.dc_id
loc = types.InputPeerPhotoFileLocation( loc = types.InputPeerPhotoFileLocation(
peer=await self.get_input_entity(entity), peer=await self.get_input_entity(entity),