phone.discardCall
Refuse or end running call
Example
const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result = await client.invoke(new Api.phone.discardCall({
video: true,
peer: new Api.InputPhoneCall({...}),
duration: 789254,
reason: new Api.PhoneCallDiscardReason({...}),
connectionId: 2038378,
}));
console.log(result); // prints the result
})();import {Api, TelegramClient} from 'telegram';
import {StringSession} from 'telegram/sessions';
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result: Api.Updates = await client.invoke(new Api.phone.discardCall({
video: true,
peer: new Api.InputPhoneCall({...}),
duration: 789254,
reason: new Api.PhoneCallDiscardReason({...}),
connectionId: 2038378,
}));
console.log(result); // prints the result
})();TL schema
Parameters
Name
Type
Description
Result
Possible errors
Code
Type
Description
400
CALL_ALREADY_ACCEPTED
The call was already accepted
400
CALL_PEER_INVALID
The provided call peer object is invalid
Can bots use this methd ?
yes
Related pages
Last updated
Was this helpful?