Flags & Debug
logQuota
$logQuota
The function $logQuota returns a log quota value. It exists for compatibility with the original BibiScript: it always returns a positive value, so a script that checks it has enough quota before logging keeps working. It is a fixed value: it does not count the logs you emit. On a hosted bot the actual limit is 600 $log lines per minute and per bot.
Syntax
$logQuota
Parameters
None. Any argument is refused (“Invalid argument count”).
Return Value
- Type: String (a number as text)
- The value of the context variable
log.quotaif the entry point supplied one, otherwise the constant1000.
Behavior
- The value is not decreased by calls to
$log[]: the engine keeps no counter. - No plan or subscription is consulted.
- It never reaches zero, so a “enough quota?” check always passes.
Examples
Display the quota
$sendMessage[Log quota: $logQuota]
Compare with a threshold
$if[$logQuota<100]
$sendMessage[Low log quota.]
$else
$sendMessage[Log quota: $logQuota]
$endif
Notes
$log[text]forwards its text to the log callback of the execution context and returns an empty string.
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.