DiscardCallRequest
Only users can use this request. See code examples.
---functions--- phone.discardCall#b2cbc1c0 flags:# video:flags.0?true peer:InputPhoneCall duration:int reason:PhoneCallDiscardReason connection_id:long = Updates
Returns
Updates |
This type can be an instance of either:
UpdateShort | UpdateShortChatMessage |
UpdateShortMessage | UpdateShortSentMessage |
Updates | UpdatesCombined |
UpdatesTooLong |
Parameters
peer | InputPhoneCall | |
duration | int | |
reason | PhoneCallDiscardReason | |
connection_id | long | |
video | flag | This argument defaults to None and can be omitted. |
Known RPC errors
This request can cause 2 known errors:
CallAlreadyAcceptedError | The call was already accepted. |
CallPeerInvalidError | The provided call peer object is invalid. |
You can import these from telethon.errors
.
Example
from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result = client(functions.phone.DiscardCallRequest( peer=types.InputPhoneCall( id=-12398745604826, access_hash=-12398745604826 ), duration=42, reason=types.PhoneCallDiscardReasonMissed(), connection_id=-12398745604826, video=True )) print(result.stringify())