Skip to main content

Life-Hack #5: One time Bonus for Subscription

This life-Hack will allow you to create one-time Bonuses with (or without) checking user's subscription to your Channel or Group, with or without percent accrual to the Referral Parent, as well as the functionality of a limited number of bonuses for the bot

Life-Hack - involves the use of existing functionality in non-obvious and rather ingenious ways, creating functions in your bot, that were not originally built by the constructors’s developers.

In this section, we publish various options and turnkey solutions for what can be created using the capabilities that are already available in the @MenuBuilderBot constructor. When creating such manuals, it is assumed that you, to one degree or another, are already familiar with the basic functions of the constructor and the basic mechanisms for working with it. If in the process of studying the presented material your basic knowledge is not enough, we advise you to study the basics before continuing.

 

❖ Acquiring of functionality

 

All functionality is purchased IN YOUR BOT, for this go to your bot:
☞ 🔐Admin | 🧩Extensions

IMPORTANT: The purchase of functionality for the bot is available only to the Creator (owner) of the bot. Admins CANNOT buy functionality!

 

One-time bonus and its variations

This guide will allow you to create a one-time user bonus in your bot. Such a bonus can be used as a one-time reward for any action, as an initial bonus for a new user, or be timed to coincide with any important event for your project and be provided from time to time. Optionally, you can add the accrual of percent to the referral parent and connect the verification of the subscription to the channel or group. Subscription verification will allow you to reward the user for the subscription.

 

You will need:

1. Numeric variable
☞ 🔐Admin | 🧩Extensions | 📂Variables

2. Button "Fix Exchange 1"
☞ 🔐Admin | 🧩Extensions | 📂Buttons

3. Conditions for buttons
☞ 🔐Admin | 🧩Extensions | 📂Buttons

4. (Optional) Bonus Ref. To the parent
☞ 🔐Admin | 🧩Extensions | 📂Buttons

5. (Optional) Subscription verification feature
☞ 🔐Admin | 🧩Extensions | 📂Protection

 

Create a one-time bonus


1. Create a variable

Go to your bot:
☞ 🔐Admin | 🗄Variables | 📙Numeric | ➕Create Variable
Variable name "bclaim" (you can use your own).

 

2. Create a bonus button

Click in your bot:
🎛Buttons Editor | ➕Add Button
The name of the button is "Bonus".

 

3. Add the accrual function

Without leaving the Buttons Editor (if you left, go back) press the inline Settings button [*].
Press "Set Fixed. Exchange"
Variable for deduction: "bclaim"
Amount of deduction: -1 (minus one of deduction, in fact will add one to the variable)
Variable for accrual: "balance". (you can specify your own)
Amount of accrual: 200 (indicate the amount of accrual you need)
Success message: "You have received %balance_v% on the balance."
Failure Message: no need - click "➖ Set Blank".

About "_v" from %balance_v% notation read in Action of Number manual.

ADDITIONAL: If the Referral Parent needs a bonus, then it can be added at this moment. To activate the ability to add a bonus, enable this function in advance, to do this, go to your bot:
☞ 🔐Admin | 🧩Extensions | 📂Buttons | Bonus to Ref. Parent
The bonus is indicated as a percentage of the deducted amount (1) or the accrued amount (2). Make sure the button below is set to: (2). Send the bot the required amount of interest from the accrual. The amount will be credited to the Balance. if the bonus is not needed, click - "✔️ Leave as is".


DO NOT exit the button settings (if exited - go back).

 

4. Add a condition to the button

Click "Assign Condition".
Condition: {%bclaim% == 0}
Message: "You have already collected this bonus."

 

5. Add the Subscription verification function

You can add it without leaving the button settings after creating the Condition. if you left the settings and the Button Editor, then go again:
🎛Button Editor | Press the inline settings button [*]
Press
: «Check Subscription (join)» and switch it to (▶️ On) position. The current state of the setting is indicated on the button.

 

Limited number of bonuses per bot

 

This principle can be used if you need to distribute a limited number of bonuses in your bot - to those people who were the first to click on the button.

 

You will need:

1. Two variables (Numeric and Global)
☞ 🔐Admin | 🧩Extensions | 📂Variables

2. Actions - 5-6 pieces
☞ 🔐Admin | 🧩Extensions | 📂Actions

3. Conditions for buttons
☞ 🔐Admin | 🧩Extensions | 📂Buttons

4. Macros and Button Expressions
☞ 🔐Admin | 🧩Extensions | 📂Buttons

5. Bonus in the Global Variable
☞ 🔐Admin | 🧩Extensions | 📂Buttons

6. (Optional) Subscription verification function
☞ 🔐Admin | 🧩Extensions | 📂Protection

 

Create limited bonus


1. Create variables

Go to your bot:
☞ 🔐Admin | 🗄Variables | 📙Numeric | ➕Create Variable
The variable's name "bclaim".
☞ 🔐Admin | 🗄Variables | 📘Global | ➕Create Variable
The variable's name is "btotal".

 

2. Create a bonus button

Click in your bot:
🎛Buttons Editor | ➕Add Button
The name of the button is "Bonus".

 

3. Add the accrual function

Without leaving the Buttons Editor (if you left, go back) press the inline Settings button [*].
Click "Assign Action"

● Select "Action of Conditions"
Condition: {%btotal% > 0}
Failure message: "The number of bonuses is exhausted".
Press "Button DO NOT SHOW content"

● Select "Action of Numbers"
Variable to change: "bclaim"
Operation type: Change Value
Value: 1 (one)
Condition: {%bclaim% == 0}
Failure message: "You have already taken this bonus."
Success message: no need - press "➖ Set Blank"

● Select "Action of Numbers"
Variable to change: "btotal"
Operation type: Change Value
Value: -1 (one)
Condition: {%btotal% > 0}
Failure message: "The number of bonuses has been depleted."
Success message: no need - press "➖ Set Blank"

● Select "Action of Numbers"
Variable to change: "balance"
Operation type: Change Value
Value: 200 (specify the amount of accrual you need)
Condition: not necessary "➖ Set Empty"
Failure
message: no need -  press "➖ Set Empty"
Success message : "You got %balance_v% your balance."

About "_v" from %balance_v% notation read in Action of Number manual.

ADDITIONAL: If the Referral Parent needs a bonus, then it can be added at this moment. If the referral parent does not need to be rewarded, skip adding of the next Action.

● Select "Action of Referral" (optional)
Variable to change: "balance" (you can use your own)
Value: 200 (specify the amount you need to accrue, or the one that you used for the bonus)
Percentage of the bonus: 10 (specify the percentage of the bonus you need)
Condition: not need - press  "➖ Set Blank "
Failure message
: no need - press  "➖ Set Blank"

This Action allows you to add a bonus to any variable, it doesn't have to be balance.

DO NOT exit the button settings (if exited - go back).

 

4. Add a condition to the button

Click "Assign Condition".
Condition: {%bclaim% == 0}
Message: "You have already collected this bonus."

 

5. Add the Subscription verification function (optional)

You can add it without leaving the button settings after creating the Condition. if you left the settings and the Buttons Editor, then go again:
🎛Button Editor | press the inline Settings button [*]
Press
: «Check subscription (join)» and switch it to (▶️ On) position. The current state of the setting is indicated on the button.

 

6. Set the number of bonuses for distribution

To do this, you can use the command /varset.
For example:
/varset btotal 50
This will allow you to distribute 50 bonuses in your bot (set the desired number).