Building
Logs and troubleshooting
The usual failure modes and how to fix each one.
Diagnose one run at a time
Record the command or event, the time, the expected result and what actually happened. Open the bot's Logs and find the first error from that attempt. A later “message not found” can be a consequence of an earlier failed send.
Command missing
Check you invited the correct application with
applications.commands, published the command, and started the runtime. Check name conflicts and scope before waiting for Discord propagation. Reopening Discord can refresh its command list.Missing permissions or hierarchy
Check the bot's permissions in the target channel, including channel overrides. Manage Roles cannot modify roles above the bot. A moderator's permission does not grant that permission to the bot, or vice versa.
Interaction failed
Confirm a Reply, Defer Reply or Show Modal acknowledges the interaction promptly. Check Custom IDs for exact matches. A channel message is not an interaction acknowledgement.
Missing data or API error
Trace where the variable is set. Check the exact key and
storeAs prefix, the branch that ran, and the HTTP status without logging secrets. Test a read-only request before a create/delete action.Ask for help
Send the bot name/ID, timestamp, flow name, failing block, redacted error and steps to reproduce. Include expected and actual behavior. Never send a token, secret header or private customer payload.