messages.editInlineBotMessage

Edit an inline bot message

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.editInlineBotMessage({
        noWebpage: true,
        id: new Api.InputBotInlineMessageID({...}),
        message: 'random string here',
        media: new Api.InputMedia({...}),
        replyMarkup: new Api.ReplyMarkup({...}),
        entities: [new Api.MessageEntity({...})],
        }));
    console.log(result); // prints the result
})();

TL schema

boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
messages.editInlineBotMessage#83557dba flags:# no_webpage:flags.1?true id:InputBotInlineMessageID message:flags.11?string media:flags.14?InputMedia reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> = Bool;

Parameters

Name

Type

Description

flags

no_webpage

Disable webpage preview

id

Sent inline message ID

message

Message

media

Media

reply_markup

Reply markup for inline keyboards

entities

Result

Bool

Possible errors

Code

Type

Description

400

MESSAGE_ID_INVALID

The provided message id is invalid

400

MESSAGE_NOT_MODIFIED

The message text has not changed

Can bots use this methd ?

yes

How to create styled text with message entities

Last updated