Last updated
Last updated
message_id - it is unique identificator for all chats of this bot.
We have several methods for editing:
Api.editMessageText
Api.editMessageCaption
Api.editMessageMedia
For income messages to bot: use request.message_id
Message_id - have unique value for all chats of bot. So we have only one message_id with value "2" and only in one chat.
In this example bot will remove old messages from bot.
in first command:
in command removeMsgAfter
:
in command removeMsg:
See command
See command
Api.editMessageLiveLocation
and etc. Please see .
Function
Description
Bot.editMessage(value, message_id)
Simple method for message editing with value and message_id
Bot.editMessage("new text", 20)
Api.editMessageText(params)
Advanced method for message editing. Please see full description here.
Function
Description
Bot.sendMessage(text)
Send message to current chat. It is simple method with markdown by default.
Bot.sendMessage("Hello from bot")
Api.sendMessage(params)
Send message. It is Telegram Bot Api method. You can pass any params like text, reply_markup, parse_mode and etc:
Api.sendMessage({
text: "Hello, <b>World!</b>",
parse_mode: "HTML",
})
By default, chat_id accord to the current chat. (chat.chatid)