_assert
From SmartBots Developers Docs
Bot PlaygroundBuilt-in Functions
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Logs data to the error log if the assertion is false.
var online = await Bot.isOnline();
_assert(online, "Bot is not online");
Reference
This command accepts the following parameters:
| Variable | Required | Description
| |
|---|---|---|---|
| Input: | |||
| assertion | yes | Any boolean expression. | |
| errorMessage | yes | The message to send to the error log if assertion is false. | |
| Output: | |||
| result | This function does not return anything | ||
- assert