How to add a message to a button or command¶
- First, access your bot. You can do so via its username.
- Once in your bot, press
🛠 Edit
to enter editing mode. -
Select the button or send the command to which you want to add a message:
- Buttons: To select a button, tap it. The button will appear surrounded by
< >
. - Commands: To select a command, send it directly to the bot. Commands start with
/
or!
.
Welcome message
To add a welcome message to your bot, send the
/start
command. - Buttons: To select a button, tap it. The button will appear surrounded by
-
Press
💬 Messages
to set one or more messages for the button or command. -
Press
➕ Message
to add a new message to the button. -
Write the message you want the button to send when pressed, or the command to send when invoked.
-
The message is saved. You will now see different options to customize the saved message.
- 💬 Edit message 💬: Edit the previously saved message.
- ✏️ Format: yes | no: Toggle between viewing the message with or without formatting, including expressions, HTML, Markdown, etc.
- 🌐 Web preview: yes | no: Show a preview of any link included in the message.
- 🔐 Protect message: yes | no: Prevent the message from being copied or forwarded by users. It also disables screenshots and screen recording.
- ⭕️ Remove keyboard: yes | no: Removes the lower keyboard displayed before this message was sent.
- 🔕 Send silently: yes | no: Sends the message without sound.
-
Press
↙️ Back ↘️
, and you’ll see the newly added message.Note
- Here you can also add more messages or questions, edit existing ones, or delete them. You can also add inline keyboards to your messages.
- The arrows
⬆️
and⬇️
let you decide the order in which messages are sent when the button is pressed or the command is sent. - The inline buttons
➕ Message
and➕ Question
below the messages add new messages or questions directly below that specific message. Meanwhile, the same buttons in the lower keyboard will always add new messages and questions to the end of the current list.
-
To exit the message editing menu, press
↙️ Exit ↘️
and then💢 Stop editor
to stop the editor. -
Click the button to see how it responds with the saved message.
Types of messages you can set for buttons and commands¶
- Simple text messages.
- Messages forwarded from other chats (these are sent as
copies
, to send asforwarded
, use the Send message action). - Multimedia messages, including photos, videos, audio files, or any type of document. These can also be a combination of text and multimedia. To save a multimedia message, simply send it to the bot while setting a message.
- Polls.
- Dices.
- Messages with expressions and variables.
Sendmultimedia from a link or file_id
¶
You can also send the following types of multimedia using links or file_id
:
photo | video | audio | document | animation | voice | sticker | video_note
The format is as follows:
{media_type:content_to_send}
-
Send a link with a photo:
{photo:"https://i.ibb.co/5vCQ4mc/gdk3al9dj.jpg"}
-
Send a
file_id
with a video:{video:"CAACAgEAAxkBAAIEjmJfooRVuMypjcUtljExwZIvpv4YAALyBwAC32gRAAECkDCsuPm6GCQE"}