AI
aiError
$aiError — Returns the error code of the last AI function call, empty if it worked.
Returns the error code of the last AI function call, empty if it worked.
Syntax
$aiError
Parameters
None.
Return Value
ai_unavailable,ai_insufficient_tokens,ai_consent_required,ai_spending_blocked,ai_rate_limited,ai_provider_failure,ai_context_limitor empty.
Usage
$ai[Hi]$aiError
Important Notes
- Specific to Bot Creator. Use it to show your own message instead of an empty answer.
Example
$nomention
$ai[Tell me a joke]
$if[$aiError!=]
(The AI is unavailable: $aiError)
$endif
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.