messages.setBotCallbackAnswer

Set the callback answer to a user button press (bots only)

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.messages.setBotCallbackAnswer({
        alert: true,
        queryId: 5130910,
        message: 'random string here',
        url: 'random string here',
        cacheTime: 3996368,
        }));
    console.log(result); // prints the result
})();

TL schema

boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
messages.setBotCallbackAnswer#d58f130a flags:# alert:flags.1?true query_id:long message:flags.0?string url:flags.2?string cache_time:int = Bool;

Parameters

Result

Bool

Possible errors

Can bots use this methd ?

yes

Last updated