Life-Hack #3: Temporary TOP of referrals in @MenuBuilderBot

Life-Hack #3: Temporary TOP of referrals in @MenuBuilderBot

MegaHubTelegram

This Life-Hack will allow you to create a temporary TOPs of referrals (TOP referrals for the certain period), as well as reset values, if necessary. The number of referrals can be both: adjusted for an individual user, and cleared totally (with values wiped out) for all users if need be.


📜 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/Life-Hack-3-Temporary-TOP-of-referrals-in-MenuBuilderBot-EN-05-03


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.



The total number of referrals one user has, is an objective figure. It cannot (and should not) be reset or somehow changed. It reflects the real number of referrals that certain individual has invited to your bot. However, there are cases (holding various contests, competitions or challenges with a prize draw), when it is necessary to take into account the number of referrals for a particular period. For such cases, this Life-Hack was created.


⬛ To create temporary top of referrals you need:


1. A numeric variable, let's say "ref_top" (1 $)

☞ 🔐Admin | 🧩Expansions | 📂Variables | Extra Variables

2. Top by variable ($ 1)

☞ 🔐Admin | 🧩Expansions | 📂Variables | Basic TOP by Variable

If you already have some digital variable not in use and/or a basic top variable, you can use them.


⬛ Preparation


1. Purchase "Basic TOP by Variable" as described above.

2. Purchase a Variable as described above.

3.1. Go ☞ 🔐Admin | 🗄Variables | 📙Numeric

3.2 Create a Variable and give it a suitable name (for example ref_top).

3.3. Switch the "Top by Variable" setting to "ON" (enabled).

4. Create a service button, for example, “Ref. Setting” for setting of variable.

5. Set following settings:

  • Admin only
  • Assign an editor (in the editor, select the variable "ref_top")

6. Come inside the button, where the editor will appear

  • In the editor, click “Referral Bonus”
  • You set there a list of one line, with just the number "1" in it.


For the owners of a multi-level referral systems there are more interesting things that can be done here (see below).


That would be it, in general: all magic is done. Now in the variable "ref_top" users will accumulate their number of referrals. The counting will start from the moment you turned on this setting.

Users can be shown their achievements through a regular %ref_top% macros of variable, use it in conditions, expressions, in general, everything is as usual.


⬛ Showing TOP to users


The top is displayed as a regular TOP for a variable (which it is). The difference of the output is that it is necessary to add:

Prefix: top

Postfix: 1u, 1v; 2u, 2v; and so on, depending on the level.


To show the time left for data update use following macros:

Prefix: top

Postfix: h - for hours

Postfix: m - for minutes


Clear the TOP

Dropping such a TOP is the regular clearing of a variable procedure. When you decide to start a new cycle, simply reset the variable for all users with the following command:

At the same time, nothing will happen with the usual parameters of the referral system (ref_count, etc.), everything will remain there as it was.



Change the value for an individual user

The value is changed in the same way as for other variables - by the commands:

/varget ref_top user_id

request variable value

/varset ref_top user_id value

set the value of a variable

/varadd ref_top user_id delta

add a value to the variable (to subtract - use a negative number).

/vardel ref_top user_id

cleans a variable to the specified user.


If you used a different name for the variable, not the "ref_top", then use it in commands.

user_id - is the Telegram ID of your user (you can use his UserCode)

value - s the value to set

delta - value to change


⬛ Several TOPs


As you know, this mechanism does not limit you to one TOP. You can thus create as many parallel TOPs as you desire. For example, TOP per day, TOP per week and TOP per month, or something like that. Repeat these steps several times with the different variables and reset the TOPs individually when you need to.


⬛ Some tricks for an advanced of you


Increased reward

The number 1, mentioned above is not the only possible number to use. You can play with this number as you will. Give some increased value for a while, if you need to encourage invitations. For example, “the next 10 hours for each referral you will receive one and a half points” and put 1.5 there in the referral reward.


Multi-level rewards

The owners of a multi-level referral systems can also give bonuses for referrals of the second, third and further levels, by adding this reward to the list of the referral rewards.

For instance:

1

0.5

0.1

It will give, in TOP, an additional 0.5 "points" for the referral of the second level, 0.1 for the third and so on.


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

Report Page