Bot functions
Function | Description |
| Send message to current chat. It is simple method with markdown by default. See more
|
| Run other command
and with options:
in second command /contact: Bot.sendMessage("Phone is:" + options.phone); |
| |
| Clear other command with run_after by label |
| |
| send keyboard and message. Message is required
|
| Send inline keyboard and message. Message is required. Buttons is array. Button must have text fields: title(required), url or command.
|
| Edit exist inline keyboard after executing the command that was called by its button
|
| Set property with name for bot. Read more
Also you can pass type: Type can be: |
| Read property with name. Name is case sensitive. Name is case sensitive. Read more.
can get property with default value for non exist property:
can get property of another bot:
|
| Delete property by it name |
| CSV import. More info here |
| Block chat:
|
| Unblock chat:
|
| Send inspected value to chat. Good for debug |
Access to property in answer:
You can also use the properties in the command's answer. For example, you can do this with the / hello command:
Total score: <TotalScore>!
Bot.run(params)
Run other command
Field | Description |
| Required. Command for run. For example "/start". Can pass params |
| json for passing to command. Available through options in this command |
| delay in seconds before command callingName is case sensitive. can be float. Exact execution time is not guaranteed. Command will be executed in background. |
| Boolean: (true or false). By default: false. If true - command will be executed in background. |
| bot_id for passing. By default this is current bot.id. This bot must be in the same BB Account |
| user_id for passing. By default this is current user.id |
| user_telegramid for passing |
| chat_id for passing. By default this is current chat.id |
| can be used for clearing with |
| do not throw error if command not found (can be used for some logic with @ command and etc). By default - false |
Example 1. Run another command /balance
with delay 1 hour for current user
Example 2. Run another command /balance
with delay 5 days for this user
Bot.clearRunAfter(options)
Can clear future command(s) execution setted by Bot.run
Use this function if future command calling not needed already
Field | Description |
| Required. Command for clearing. For example "myLabel" |
Example 1. Run another command /work
with delay 5 days. And remove that delay (for example on 3th day)
On the third day we learned that the call is no longer needed:
Bot.runAll(options)
Run other command for all chats
Use this command for broadcasting any information: message, photo, video, keyboard and etc
Bot.runAll works for worked bots only. If you start a new task before the previous old task has completed, there is no guarantee that the old task will complete for all chats.
You need to wait for the old task to complete before starting the new one.
Field | Description |
| Required. Command for run. For example "/start". Can pass |
| json for passing to command. Available through options in this command |
| run this command on task creation with task information |
| Command will be runned for this chats type only. Can be:
|
Example:
Command: /news
Command: /broadcast
Command: on_new_brodcast_task
Command: /progress
Last updated