_assert
From SmartBots Developers Docs
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