Variables
In BJS we have useful global variables.
Variable | Description |
request | |
message | current message from user - string |
user | user who sent a command or text. Fields: id (BB id), telegramid (telegram id), first_name, last_name, username, created_at, updated_at, just_created (true for new user or false for already exist. User must be totally new in BB! He is old if he start any BB bot before) first_name, last_name, username |
chat | data for current chat. Fields: id (BB id), chatid (telegram chat id), bot_id, title, chat_type (can be: "private", "group", "supergroup"), user_id, created_at, updated_at, just_created -
BB delete blocked chats after 6 months. If user start blocked bot after 6 months this chat have just_created field again |
bot | data for bot. Fields:
|
command | data for command. Fields:
|
params | command parameters - text |
owner | information about bot owner: email, id and etc |
completed_commands_count | the count of previously completed commands on |
iteration_quota | current quota information: limit, progress and etc. You can see it by |
payment_plan | current bot owner payment plan information |
BB_API_URL | api url: api.bots.business. Each Cloud have own Api Url |
You can inspect any variable for debug
Last updated