Help

Troubleshooting And Limits

Fix common script, permission, context, and runtime problems.

Published by solever7 solever7
errors limits permissions

This page is not available in es yet, so the en version is being shown.

Syntax Or Runtime Errors

The draft editor validates Lua before saving. Syntax errors identify Lua that cannot be
compiled. Runtime errors happen only after execution begins, such as reading a missing
value or calling an unavailable function. Reduce the script to the smallest failing
example and compare names with the
Lua API guide.

Script Not Found Or Inactive

/run sees active custom commands owned by you or available in the current server.
Check /list, confirm the script scope, and activate an inactive script from its
website management page. User scripts are not another user’s scripts; server scripts are
available only in their server.

Public references always use u123/name@0, g123/name@1, or c123/name@1. The owner
may be a user, server, or another supported owner type. A fixed version must exist.
Internal short IDs are not public references and are not accepted by /search.

Permissions And Context

Server script management requires Manage Server; channel-script management requires
effective Manage Channels in the owning channel. Execution availability is checked
separately. Discord events also require the bot’s relevant gateway permissions and
access to the server or channel when the event occurs. APIs that send to another channel
require a server context; a DM execution cannot invent one.

Buttons route back to the typed draft reference encoded in their component ID. Macchi
reloads its current source and rechecks the clicking user’s access, active state,
owner/name identity, server scope, and permission. Editing a saved script changes what
its existing buttons run; deleting, deactivating, or losing access makes those buttons
stop.

Safety Limits

Each run starts a fresh session. Current host limits include 5 replies, 2 direct
messages, 10 components, 20 log calls, and 40 total API calls. PopLua also enforces
instruction, 2 seconds of active work, 30 seconds of total wall time, call-depth, and
memory quotas. Suspended next.secs waits do not spend active time, but they continue
spending wall time. One run may request at most 5 delays of at most 10 seconds each.
Infinite loops are interrupted. Split excessive work into a smaller response; do not
retry a failing script in a tight loop.

Scheduling is not available. Any example using macchi.schedule is not valid for the
current product.

Service Problems

If Macchi reports that its script service is unavailable, wait and retry once. The bot
cannot safely create, load, or update scripts while Rails is unreachable. Persistent
failures need the bot owner to inspect service logs; normal user responses intentionally
do not include stack traces or credentials.

For suspicious or abusive automation, keep the Discord message link and relevant server
details, then open the Safety and reporting page. It links to the
configured official support server without asking you to publish private content.