In this article we gathered all the necessary information about variables in PuzzleBot service.

Variables is the name of the function that allows you to substitute certain values individually for each user. All variables have a common form {{NAME}} to denote use double curly braces on both sides and "a-z" "A-Z" "0-9" "_" for the variable name.

For example: to greet a user by name when entering a bot or group.

Please note that you do not need to specify {{}} in the "Variable" field in the Input Form, the service will automatically fill it in for you.

Important! The /start command is excluded from the response to the form and is executed regardless of the mask.

All variables encountered in service PuzzleBot can be divided into three groups:

  1. General variables (working everywhere);
  2. Variables working only in the bot;
  3. Variables working only in resources (chats and channels).

Let's analyze each group.

General variables

This group of variables was created by the administrators of the service and it: 

  • Not subject to editing;
  • Works both in the bot and in resources (channels and groups).

  1. {{BOT_NAME}} — The name of the bot (by reference);
    {{BOT_NAME_TEXT}} — Bot name;

  2. {{BOT_USERNAME}} — Bot's username (by link);
    {{BOT_USERNAME_TEXT}} — Bot's username;

  3. {{HOURS}} — Clock (two-digit number);

  4. {{MINUTES}} — Minutes (two-digit number);

  5. {{SECONDS}} — Seconds (two-digit number);

  6. {{DAY}} — A day in a month (two-digit number);

  7. {{MONTH}} — The number of the month (two-digit number);
    {{MONTH_TEXT}} — Month (text);

  8. {{YEAR}} — Year (four-digit number);

  9. {{WEEKDAY}} — Day of the week (by text);

  10. {{USD}} — Dollar rate (taken from, displayed in dollars);

  11. {{EUR}}  — Euro exchange rate (taken from, displayed in dollars);

  12. {{BTC}}  — Bitcoin exchange rate (taken from CoinMarketCup);

  13. {{ETH}}  — Etherium exchange rate (taken from CoinMarketCup);

  14. {{BIP}}  — Minter blockchain BIP rate (taken from CoinMarketCup);

  15. {{HUB}}  — Minter blockchain HUB rate (taken from CoinMarketCup);

Work only in the bot or in resources, but in events (greeting new users or triggers):

  1. {{FIRST_NAME}} — Username (link); 
    {{FIRST_NAME_TEXT}} — Username;

  2. {{LAST_NAME}} — The user's last name (link);
    {{LAST_NAME_TEXT}} — User's last name;

  3. {{USERNAME}} — The user's username (link);
    {{USERNAME_TEXT}} — The user's username (text);

  4. {{USER_ID}} — Telegram user ID (link);
    {{USER_ID_TEXT}} — User ID in Telegram;

  5. {{CATEGORY_NAME}} or {{CATEGORY_NAMES}} — The name of the category the user is in.

  6. {{JOIN_DATE}} — Date the bot or resource was logged in (in the format "26.06.2020 15:41:29");

  7. {{ACTIVE_SCENARIOS}} — Active scenarios (names in comma-separated text);

Important! All date and time variables take values relative to the time zone set in the account settings.

Variables that only work in the bot

A user-defined group of variables formed by the Input Forms and Input tab, details: Input Form.

Variables working only in resources

  1. All common variables;

  2. {{RES_TITLE}} — The name of the resource to which the message, greeting, etc., is sent. (link);
    {{RES_TITLE_TEXT}} — Name of the resource to which the message, greeting, etc. is being sent;

  3. {{RES_DESCRIPTION}} — Description of the resource where the message, greeting, etc. is sent.