_assert
Logs data to the error log if the assertion is false.
var online = await Bot.isOnline();
_assert(online, "Bot is not online");Input
Variable | Required | Description |
|---|---|---|
| yes | Any boolean expression. |
| yes | The message to send to the error log if |
Output
This function does not return anything.
Comments
If the assertion evaluates to false, the provided errorMessage is logged to the error log.
Useful for debugging and validating assumptions during bot script execution.
Examples
var online = await Bot.isOnline();
_assert(online, "Bot is not online");