Conditions in @MenuBuilderBot

Conditions in @MenuBuilderBot


Introducing conditions we are starting to give admins abilities to define conditional behaviour of the bots in @MenuBuilderBot.

Русский перевод, который любезно предоставлен переводчиком Яндекса, здесь.

How to get Conditions

Before you can use conditions, you should enable them in your bot:

🔐 Admin

* 🧩 Extensions

* 📂 Buttons

* 🔌 (Plugin) Conditions

How conditions look like

Conditions are expressions (manual on expressions is here) with additional comaprison and logical operators. You can use all power of expressions in conditions.

In spite of expressions, condition should return TRUE or FALSE as the result.

Comparison operators

  1. >, >= (greater, greater or equal)
  2. <, <= (less, less or equal)
  3. == (equal) Note! Not a single "="!
  4. != (not equal)

Examples: {condition} => TRUE/FALSE

  1. {2 > 3} => FALSE
  2. {2*3 >= 5} => TRUE
  3. {(10-1) == (11-2)} => TRUE
  4. {%balance% > 100} => TRUE if user balance greater then 100 else FALSE

Logical operators

Logical operators uninons results of several logical expressions. Each logical expression should return TRUE/FALSE. It's highly recommenede to use bracers "(" ")" to define logical expression.

  1. and
  2. or
  3. not

Examples:

  1. {(%balance% > 0) and (%refcount1% > 0)} => TRUE if user have some money on his balance and at one or more referrals
  2. {(%balance% > 0) or (%usd% > 0)} => TRUE if user have some money on his balance account or some money on his USD account
  3. {((%balance% > %vip_price%) and (%manual_ban% == 0)) or (%vip% == 1)} => TRUE if user have enough money to enter and is not banned or it's a VIP user
  4. {not(%balance% > 0)} => TRUE if user balance is not greater than zero (is less or equal to zero). Mainly used for confident for complex expressions.

Conditions in buttons

Conditions can be used to define if user can access button (any button!) or not.

Go to button settings:

Press assing condition:

And... Assign condition. :)

This button will work only if user have the value of balance variable greater then 100.

Mailing conditions

The new killing feature in @MenuBuilderBot: mailing conditions. Now you can define who will receive your mailing messages.

You can set any applicable conditions here. For example:

{%balance% > 0}

will send mail only to users that have anything on their balance.

Future work

In future usage of the conditions will be extended. Stay tuned.

All @MenuBuilderBot tutorials

https://telegra.ph/All-MenuBuilder-Tutorials-06-29

Report Page