mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-30 17:59:55 +03:00
hmm ?
This commit is contained in:
parent
978c5874e2
commit
c48e8b98cc
|
@ -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
|
|
@ -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),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user