Life-Hack #3: Temporary TOP of referrals
This Life-Hack will allow you to create temporary TOPs of referrals (top referrals for certain period), as well as reset the values if necessary. The number of referrals can be either adjusted for an individual user, or cleared all values for all users, if need be.
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!
You will need:
1. Numeric variable, let's say ref_top
.☞ 🔐Admin | 🧩Extensions | 📂Variables
2. Top by variable.☞ 🔐Admin | 🧩Extensions | 📂Variables
If you already have an unnecessary digital variable and / or base top variable, you can use them.
❖ Creation of TOP
1. Purchase "Basic Top by Variable" as described above.
2. Purchase the variable as described above.
3. Go
☞ 🔐Admin | 🗄Variables | 📙Numeric
3.1 Create a Variable and give it a suitable name (For example ref_top
).
3.2. Switch the Top by Variable setting to ON (enabled).
4. Create a service button, for example, “Ref. setting” for setting a variable.
5. Set its settings:
Admin only
Assign editor (in the editor select the variable "ref_top
").
Leave the settings.
6. Go to the button, the editor will appear
In the editor, click “Referral Bonus”.
Specify there a list of one line, in which there is just the number “1”.
For owners of a multi-level referral system - here you can do more interesting things, see below.
That is all, in general: all the magic has happened. Now in the ref_top
variable, the number of user's referrals will be accumulated. Counting will start from the moment you enabled this setting.
Users can be shown their achievements through a regular macro of variable %ref_top%
, use it in conditions, expressions, in general, everything is as usual.
❖ Displaying the TOP
The top is displayed as a regular TOP for a variable (which it is). The difference of the output is that you need to add:
Prefix: top
Postfix: 1u
, 1v
; 2u
, 2v
; and so on depending on the level.
Example:
Our TOP of Referrals:
1 lvl. %topref_top1u% - %topref_top1v%
2 lvl. %topref_top2u% - %topref_top2v%
Prefix: top
Postfix: h
- hours
Postfix: m
- for minutes
Example:
Update is after: %topref_toph% hours %topref_topm% minutes.
❖ Resetting the TOP
Resetting such a top is the usual clearing of a variable. When you decide to start a new collection cycle, simply reset the variable for all users with the command./varclearall ref_top
At the same time, nothing will happen with the usual parameters of the referral system (the ref_count
and so on), everything will remain as it was.
❖ Changing the value for an individual user
Changing the value is done in the same way as for other variables - with the commands:/varget ref_top user_id
request the value of the variable
/varset ref_top user_id value
set the value of a variable
/varadd ref_top user_id delta
add a value to a variable (to subtract - use a negative number).
/vardel ref_top user_id
clears the variable of the specified user.
If you used a name other than ref_top
for the variable, use that name in the commands.
Where:user_id
- this is the Telegram ID of your user (you can use its UserCode)value
- this is the value to setdelta
- the value to change
❖ Several TOPs
As you can probably see, this mechanism does not limit you to one TOP. In this way, you can create as many parallel TOPs as you like. For example, TOP for the day, TOP for the week and TOP for the month, or something like that. Repeat the above steps several times, with different variables and reset the TOPs separately when you need.
❖ Tricks for advanced
Increased remuneration
The number 1
above is not the only one possible. You can play with this number the way you want. Give an increased value for a while if you want to encourage invites. For example, “for the next 10 hours for each referral, you will receive one and a half points” and put 1.5 there as a referral reward.
Tiered reward
Owners of multi-level referral systems can also give bonuses for referrals of the second, third and so on levels, adding this reward to the list of referral rewards.
For example:
1
0.5
0.1
Will give in the TOP an additional 0.5 for the referral of the second level, 0.1 for the third, and so on.