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

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

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

Was this helpful?