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:

UpdateShortUpdateShortChatMessage
UpdateShortMessageUpdateShortSentMessage
UpdatesUpdatesCombined
UpdatesTooLong

Parameters

peerInputPhoneCall
durationint
reasonPhoneCallDiscardReason
connection_idlong
videoflagThis argument defaults to None and can be omitted.

Known RPC errors

This request can cause 2 known errors:

CallAlreadyAcceptedErrorThe call was already accepted.
CallPeerInvalidErrorThe 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())