Macros
Macro is a macro command containing a sequence of predefined actions. In this case, it is the substitution of the data associated with it in the place where the specific macro is specified.
Each macro must be enclosed in percent signs "%macro%
" to be recognized by the system as such.
In the @MenuBuilderBot project, macros are used in text, expressions, conditions, commands, inline button titles, and elsewhere.
Thus, in the text, the macro indicates the place where you need to substitute some value, for example, the value of a variable (for example, Balance) or an individual user parameter (for example, his Name). The text of the macro will be replaced with its associated value when the message is displayed to the user. Thus, macros allow the text of the same message to display data personally for each user. In expressions, a macro can be used to substitute the values of digital (or other) variables.
The name of variable macros is the name of the variable itself, enclosed in percent signs %variable_name%
.
For example, a macro %balance%
is the name of the "balance
" variable containing the individual balance data of the user. When specified in the text, it will show the balance data of the user to whom the message is shown.
Macro %firstname%
- will show the username of the person in Telegram.
If you (or users of your bot) have changed the First Name, Last Name or any other data of the account, these changes may not be displayed immediately in your bot. The data will be updated after some time, at the start of one of the future User Sessions.
All macros that are available initially can be found in the "Basic Functions" section.
Additional macros that are available in the bot.
User macros.
To connect, go in your bot:☞ 🔐Admin | 🧩Extensions | 📂Macros