How to manage Inline Buttons in @MenuBuilderBot

How to manage Inline Buttons in @MenuBuilderBot

MegaHubTelegram

@MenuBuilderBot allows you to attach inline buttons to the messages of the bot. This manual will help you to work with inline buttons (keyboard). It describes the types of inline buttons and how to use them.


📜 The translation of this materials into your native language can be automatically done using the Google translator. Follow the link and select the desired language in the title:
https://translate.googleusercontent.com/translate_c?depth=1&sl=en&tl=es&u=https://telegra.ph/How-to-manage-Inline-Buttons-in-MenuBuilderBot-EN-07-19



⬛ What is Inline buttons (keyboard)


Inline Keyboard - is a keyboard attached to a chat message and can be used to interact with the bot instead of sending a messages (commands) from an regular keyboard of the lower menu.


At the moment there are 3 types of inline buttons in @MenuBuilderBot.

• URLs (links)

• Pop-up windows

• Commands


Example of inline buttons

Add them in the next easy steps:


⬛ Adding inline buttons


1. Go to post editor

and create a message (as you always do) or take the ready message and go to the "Message Settings":


2. Press one of the "➕ Inline button"

The difference between "➕ URL button ➡️" and "➕ URL button ⬇️" will be described below.


3. Make the message with two lines

TWO lines!

The first line will always be the button title.

The second line can have different meanings depending on the mode in which the inline button is created.


Use the button with the name of the mode to switch between modes:

Mode 1: URL or Share button.

The second line must contain a valid address (URL). For example:


When user will click this button the given URL will be opened:

Mode2: Pop-up window.

Second and other lines should contain any text (not more then 200 symbols!) that will be shown in pop-up winow. For example:

When user will click this button the given text will be shown in pop-up window:

Mode 3: Command.

Second line should contain the valid command assigned to any button in the menu (detaild manual for commands is here: https://telegra.ph/How-to-manage-Commands-in-MenuBuilderBot-11-25).

You can use command:

to refer to Main Menu of your bot.

Command:

will work as normal command /start send to bot.

For example:

When the user will click this button the given button messages will be shown.


4. Bingo: you got the Inline URL Button


5. Clicking on this button inside the editor will delete the button

In the "deleted" message there will be the button data. If you need you can copy it and create the button again.


6. You can place button in the last raw or into the new row.

When you create second+ button click on the:

  • "➕ URL button ↔️" will place the button on the right side of the last row
  • "➕ URL button ↕️" will place the button on the new row

You can combine these buttons to make something like this:

When you press "Exit Message Settings" everything will be saved.

When you press "Stop editor" you'll see the result (as the user will see it):


⬛ Inline buttons deletion


Message with inline button type "command" can be deleted automatically, right after user clicked the button with command.


Not deleted by default.


Works in 2 modes:

1 - will delete the message with inline

2 - will delete the message with in line and one message before it.


The removal mode you need is selected empirically.

To set up go in your bot:

☞ 🔐Admin | ⚙️Settings


⬛ Errors while working with inline buttons


ERROR: You have not used the bot for some time, and when you click on the inline button (or the regular the botton of the lower menu), the bot takes you to the "Main Menu".

REASON: The bot's working sessions are always terminated after 30 minutes of inactivity. At the same time, for security reasons, any "closed" sections of the bot (by condition, captcha, etc.) become inaccessible. You can get in there only by going agailn all the way through the button that actually closes the entrance. Moreover, if the inline-button (or the regular button of the lower menu) is located or leads to such a "closed" section, the bot will not allow it to work until the user enters this section again through the button that actually closes the entrance.

SOLUTION: This behavior of the bot is the safest and there are no plans to change this mechanic in the near future. There is no solution as such.


ERROR: You have created a new Inline-button in command mode which leads to the depth of the lower menu and it does not show the required message.

REASON: The lower menu button accessed by the inline-button command is inside the "closed" area of the bot. It is not possible to access the closed area from the outside. This ensures the safety of closed areas.

SOLUTION: "Move" (or duplicate) the addressee button from the closed area of the bot, for example, to the "Main Menu" and place the necessary condition on it. The button itself must be made hidden from the user - either Admin Only or Invisible.



All @MenuBuilderBot tutorials

https://telegra.ph/All-MenuBuilder-Tutorials-06-29

Report Page