This commit is contained in:
New-dev0 2021-06-11 15:38:18 +05:30
parent 3436e4e57d
commit 3692f56a32
6 changed files with 17 additions and 22 deletions

View File

@ -1418,17 +1418,21 @@ class ChatMethods:
return await self(
functions.phone.CreateGroupCallRequest(
peer=entity,
schedule=schedule)
schedule_date=schedule)
).updates[0]
try:
Call = await self(
functions.messages.GetFullChatRequest(entity))
except errors.rpcerrorlist.ChatIdInvalidError:
except errors.rpcerrorslist.ChatIdInvalidError:
Call = await self(
functions.channels.GetFullChannelRequest(entity))
Call = Call.full_chat.call
if method == "edit_title":
return (await self(functions.phone.EditGroupCallTitleRequest(
Call, title=title if title else ""))).updates
elif method == "edit_perms":
reqs = await self(
functions.phone.ToggleGroupCallSettingsRequest(
@ -1436,13 +1440,16 @@ class ChatMethods:
call=Call,
join_muted=join_muted))
return reqs.updates
elif method == "discard":
return (await self(
functions.phone.DiscardGroupCallRequest(Call))).updates
elif method == "start_schedule":
return (await self(
functions.phone.StartScheduledGroupCallRequest(Call))
).updates
else:
self._log[__name__].info(
"Invalid Method Used while using Modifying GroupCall")

View File

@ -395,6 +395,11 @@ class DownloadMethods:
date = datetime.datetime.now()
media = message
if isinstance(media, types.MessageService):
if isinstance(message.action,
types.MessageActionChatEditPhoto):
media = media.photo
if isinstance(media, types.MessageMediaWebPage):
if isinstance(media.webpage, types.WebPage):
media = media.webpage.document or media.webpage.photo

View File

@ -151,10 +151,7 @@ class UploadMethods:
* An external URL to a file over the internet. This will
send the file as "external" media, and Telegram is the
one that will fetch the media and send it.
* A Bot API-like ``file_id``. You can convert previously
sent media to file IDs for later reusing with
`telethon.utils.pack_bot_file_id`.
.
* A handle to an existing file (for example, if you sent a
message with media before, you can use its ``message.media``

View File

@ -18,20 +18,6 @@ class File:
def __init__(self, media):
self.media = media
@property
def id(self):
"""
The bot-API style ``file_id`` representing this file.
.. note::
This file ID may not work under user accounts,
but should still be usable by bot accounts.
You can, however, still use it to identify
a file in for example a database.
"""
return utils.pack_bot_file_id(self.media)
@property
def name(self):

View File

@ -144,7 +144,7 @@ GRAPH_OUTDATED_RELOAD,400,"Data can't be used for the channel statistics, graphs
GROUPCALL_FORBIDDEN,403,
GROUPCALL_JOIN_MISSING,400,
GROUPCALL_SSRC_DUPLICATE_MUCH,400,
GROUPCALL_NOT_MODIFIED,400
GROUPCALL_NOT_MODIFIED,400,
GROUPED_MEDIA_INVALID,400,Invalid grouped media
GROUP_CALL_INVALID,400,Group call invalid
HASH_INVALID,400,The provided hash is invalid

Can't render this file because it has a wrong number of fields in line 147.

View File

@ -313,7 +313,7 @@ phone.discardCall,user,CALL_ALREADY_ACCEPTED CALL_PEER_INVALID
phone.getCallConfig,user,
phone.inviteToGroupCall,user,GROUPCALL_FORBIDDEN
phone.joinGroupCall,user,GROUPCALL_SSRC_DUPLICATE_MUCH
phone.joinGroupCallPresentation,403, PARTICIPANT_JOIN_MISSING
phone.joinGroupCallPresentation,user, PARTICIPANT_JOIN_MISSING
phone.receivedCall,user,CALL_ALREADY_DECLINED CALL_PEER_INVALID
phone.requestCall,user,CALL_PROTOCOL_FLAGS_INVALID PARTICIPANT_CALL_FAILED PARTICIPANT_VERSION_OUTDATED USER_ID_INVALID USER_IS_BLOCKED USER_PRIVACY_RESTRICTED
phone.saveCallDebug,user,CALL_PEER_INVALID DATA_JSON_INVALID

1 method usability errors
313 phone.getCallConfig user
314 phone.inviteToGroupCall user GROUPCALL_FORBIDDEN
315 phone.joinGroupCall user GROUPCALL_SSRC_DUPLICATE_MUCH
316 phone.joinGroupCallPresentation 403 user PARTICIPANT_JOIN_MISSING
317 phone.receivedCall user CALL_ALREADY_DECLINED CALL_PEER_INVALID
318 phone.requestCall user CALL_PROTOCOL_FLAGS_INVALID PARTICIPANT_CALL_FAILED PARTICIPANT_VERSION_OUTDATED USER_ID_INVALID USER_IS_BLOCKED USER_PRIVACY_RESTRICTED
319 phone.saveCallDebug user CALL_PEER_INVALID DATA_JSON_INVALID