Message broadcasting and editing
Function | Description |
| Send message to current chat. It is simple method with markdown by default.
|
| Send message. It is Telegram Bot Api method. You can pass any params like text, reply_markup, parse_mode and etc:
|
Do you want broadcast text to all chats?
See Bot.runAll command
Do you want broadcast photo, video and etc?
See Bot.runAll command
Message editing
Function | Description |
Bot.editMessage(value, message_id) | Simple method for message editing with value and message_id
|
Api.editMessageText(params) | Advanced method for message editing. Please see full description here. |
message_id - it is unique identificator for all chats of this bot.
We have several methods for editing:
Api.editMessageText
Api.editMessageCaption
Api.editMessageMedia
Api.editMessageLiveLocation
and etc. Please see here.
Message_id for income messages to bot
For income messages to bot: use request.message_id
Example
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.
Bot message removing
In this example bot will remove old messages from bot.
in first command:
in command removeMsgAfter
:
in command removeMsg:
Last updated