Actions in MenuBuilderBot

Actions in MenuBuilderBot

MegaHubTelegram

The @MenuBuilderBot constructor allows you to configure any button in your bot to perform an almost unlimited number of actions ones it is clicked by the user.


The functionality of the Actions is extensive and flexible in a way of its application, therefore, the description of all the nuances of working with it is a huge and rather tedious document, which, however, you must be familiarized with. If this is the first time you trying to familiarize yourself with it, just read it in its entirety. In the future, to clarify the details, you can refer to its separate parts as a reference.


📜 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/Actions-in-MenuBuilderBot-EN-04-16


⬛ Table of Content

What is Action

Purchasing Actions

The conception of Actions

Nuances of Action’s executions

Types of Actions

Elements of Action’s management

Additional Information



⬛ What is Action


Action in @MenuBuilderBot is a way to perform one operation. One Action means one execution. Actions can be different: change the value of a variable, check a condition, etc.

Actions are added to the button. Adding one Action is like setting up a Bonus or an Exchange button. Actions are triggered when the user clicks a button in your bot or due to any other call (refer) to the button's functionality.

The main difference is that you can add an unlimited number of Actions to a button, which will allow you to perform all those actions with one click of a button. By combining Actions, you can create unique algorithms and sequences of actions, thereby obtaining the desired functionality.

Actions are divided into 2 types according to the execution time: Pre-Action and Post-Action and, accordingly, can be executed both before the main functionality of the button, and after it.


⬛ Purchasing Actions


To add feature go to your bot:

☞ 🔐Admin | 🧩Extensions | 📂Actions


Since Actions are inherently capable of creating an unlimited load on the system, their functionality is provided with the special conditions.

They are sold individually and in packages of 25 and 100 units per bot. To create a meaningful system, dozens of Actions are needed, so the cost of Actions in packages is radically lower than the cost of single Actions.

Actions can be added to buttons and removed from there any number of times, however, the total number of simultaneously added Actions cannot exceed the total number purchased.


After the acquisition, regardless of quantity, you will have access to 50k of Actions executions per bot, per month. The remaining amount for the month is indicated at the entrance to the Admin panel of your bot. The date of the month on which a new monthly package will be provided being tracked individually for each account and is also indicated at the entrance to the Admin panel.


After the exhaustion of available executions, the operation of all Actions in the bot will be slowed down to 1 second for each Action to perform.

If 50k executions per month are not enough for you, you can purchase the package “Functions Tokens”. One package is 100k executions.


⬛ The conception of Actions


To better understand the concept of Actions, remember the “Bonus” and “Fix. Exchange" buttons.


We can conditionally say that the “Exchange” button consists of two Actions:

1. Deduction of a certain amount from one variable

2. Accrual (adding) of a certain amount to another variable

Total 2 executions, means 2 Actions.

In the “Bonus” button, for example, there is only 1 Action (accrual) (although it still has an additional function of the cooldown period).


Before the appearance of the Action functionality, buttons could perform only one or two actions predefined in them. Now, there can be as many actions as you like and everything is limited only by your imagination and the needs of your project.


⬛ Nuances of Action’s executions


For a better understanding of the mechanics of the Actions, keep in mind the following points:

If you want to be able to use in Actions some

• «Macros»

• «Expressions»

• «Conditions»

• And also that Action to be able to work with Global Variables

it will be necessary to activate the appropriate plugins.


To add feature go to your bot:

☞ 🔐Admin | 🧩Extensions | 📂Buttons

These are shared Plugins and therefore they affect the entire bot: the Bonus and Exchange buttons, Actions and others.


1. Actions are performed one by one from the top with the number 1 to the last one at the bottom.

2. If any error occurs, the execution of the chain of Actions will be ceased. For example, the first two Actions have worked, and the third one is giving an error, in this case, the further execution will be interrupted, but the changes made by the first two Actions will remain “as is”. If the operation of any Actions is critical, verify the possibility for the Action to be executed by applying the individual Action condition, a separate «Action Condition» or the «Condition» of the Action containing button itself.

3. Actions can be used in the button where «Bonus», «Fixed Exchange 1» or «Course Exchange 2» has already been added, in this case, the «Bonus» or «Exchange» will work first, and the Actions will follow.

4. For the buttons "Bonus", "Fix. Exchange 1" or "Course. Exchange 2" when adding Actions, the "Success" and "Failure" messages will be common.

5. A button with Actions, like any other button, can have its own «Condition» added.

6. Each Action can be added with its own message about “Success” or the “Failure” of its operation.

7. When adding Actions to the button, a General “Success Message” and a General “Failure Message” can be added to their entire set, in addition to those that can be added individually to each of the Actions. These messages will be displayed regardless of the display of individual messages of each Action. These messages apply to ALL ACTION BLOCK. Meaning, if EVERYTHING is completed, there will be a “Success Message”. If something went wrong in at least one, an error “Failure Message”. In reality, “something is wrong” can only go if the problems with «Expressions» or the numerical variables “went negative”.

8. If several Actions have messages in the button, they will all be shown when pressed (plus General Messages).

9. If all possible extensions are added to the button, they will work in the following sequence:
    0. Command to activate the button itself
    1. Conditions
    2. Bonuses and Exchanges
    3. Pre-Actions
    4. Forms and messages of the button itself.
5. Post-Actions

10. Every Action can be added with Comment.

11. If the button contains Actions, then when you select such a button in the "Button Editor" mode, an inline button for editing them will appear:


⬛ Types of Actions


At the time of this manual writing, there are already six types of Actions in the system.

1. Action of Numbers

2. Action of Conditions

3. Action of Referrals

4. Action of Initialization

5. Action of Commands

6. Action of Transactions

7. Action of Messages (soon)

8. Action of Texts (soon)


More details about every Type of Actions read in separate manual:

«Action Types in @MenuBuilderBot»


ADDING OF ACTION

To add an Action:

• Go to «🎛 Button Editor»

• Select a button

• Press «*» asterisk (to enter button settings)

• Click «Assign Action»


You will be prompted to select one of the several “types” of the Actions.


⬛ Elements of Action’s management


Main elements

The Actions created are represented as messages in the chat with the bot.

Under each message with Action’s data, there are inline buttons that allow you to control each particular Action.

● «Replace» - allows you to change the data of an existing Action

● «Delete» - will delete the Action

● Up and Down arrows, allow you to move Actions by changing the order of their execution in the chain when you click the button.

● «Copy» - copies the Action you created to the clipboard and allows you to paste a copy into the same chain or to the chain of any other button. The meaning is, that your Actions can be copied between the buttons.


● «Disable» (Off) - you can stop the execution of an individual Action. This function is designed to search for errors when creating complex sequences of actions by excluding individual elements from processing. This allows not to delete Action for the sake of one test.

Button of turning the Action Off
Button of turning the Action On and Reminder


Preview of Action messages when creating them.

In order for the text of messages assigned to Actions to be displayed in the Action settings, use the command with parameters:

The parameter is any integer from 0 to 200.
The parameter determines the number of characters that will be shown in the preview.
If the parameter is equal to 0 (zero) (default value), instead of the message, a regulal check will be displayed, as before.

For instance:

Default setting (no message display)

Shows the first 30 letters of the assigned messages.

The setting is applicable to messages about condition failure or about successful execution of the Action itself.


⬛ Additional Information


Where to get plugins:

Since Actions are part of the functionality of buttons, plugins expanding their functionality:

● «Macros»

● «Expressions»

● «Conditions»

● Working with Global Variables

are shared with the plugins of the Bonus and Exchange buttons and therefore are purchased there.


To add it, go to your bot:

☞ 🔐Admin | 🧩Expansions | 📂Buttons

If you have already purchased any of the plugins for Bonus buttons or Exchange Buttons in this bot, then you no longer need to buy them, these are common plugins for all of them.

You can use Expressions in Actions.

Moreover, working with Expressions is a key feature of Actions, so a clear understanding of the mechanics of working with them will raise your project to a completely different level. Manual on Expressions

You can use «Time» variables in Action’s Expressions.

This will allow you to save certain dates by storing them in variables, measure time intervals, showing the time remaining before the event to the user (the remaining time of subscriptions, the trip "to the forest" time in games, etc.), calculate other data (investment sizes depending on elapsed time, for example). Date and Time manual.


https://telegra.ph/Menu-Builder---All-Help-Materials-02-22

Report Page