Riscord Back to chat

Developer docs

Build a bot that belongs in your community.

API v1 SDK 0.5.0

Errors and troubleshooting

Get a bot online, diagnose permissions and recover without repeating unsafe actions.

Examples use the bot client from Your first bot.

Understand API errors

Both SDKs expose RiscordError.status. HTTP helpers retry supported reads, replacements and keyed sends with bounded attempts. Unkeyed moderation actions are not automatically repeated.

StatusNext step
400Check the field names, types, command schema and payload limits
401Check RISCORD_BOT_TOKEN and reset a leaked or invalid token
403Check install consent, selected channels, hierarchy and recipient privacy
404Check the resource ID and whether the bot can still access it
409Refresh replaced state or explicitly rejoin an ended voice connection
429Honor Retry-After and reduce request volume
503Temporary capacity limit; honor Retry-After and use bounded retries

My command is missing

  1. Confirm the bot process is running and the gateway reached ready.
  2. Register the command and include its intended server or dm context.
  3. Check that the bot is installed in this server and can view the channel.
  4. If you changed requested permissions, reauthorize the installation.

My embed is hidden or rejected

  1. Use SDK 0.3.0 or newer and pass embeds as a list, even for one card.
  2. In a server channel, check Embed Links in the application, installation and channel permissions. Suppressed embeds remain stored.
  3. Check the per-field and combined text limits, HTTP(S) artwork URLs and RGB color value.
  4. Resolve relative upload paths to absolute HTTP(S) URLs for embed artwork. imageUrl and fileUrl message fields can use relative upload paths.
  5. When editing, use an empty list to clear embeds. Null / None is not an embed list.

A reply edit no longer works

Reply handles last fifteen minutes. Their bot installation, original requester’s access and private/public audience are checked again for every edit or deletion. A deleted reply cannot be edited. Use the response ID returned by the message reply, rather than its interaction ID.

A click creates a fresh component interaction. editReply refers to the first response sent by that new interaction, rather than the older message containing the button. Use the channel/DM message helper to edit the bot’s own ordinary source message.

Voice joined, but there is no audio

  1. Check Connect and Speak in application requests, installation grants and the target channel.
  2. Check server mute and server deafen for the bot.
  3. Run ffmpeg -version on the bot host and confirm libopus and SRTP support.
  4. Use a local file or direct media URL, and check outbound UDP connectivity. There is no TCP media fallback.
  5. In JavaScript, join from ready. After a lost gateway, explicitly rejoin instead of reusing a closed VoiceConnection.

Share useful diagnostics

The Developer Portal shows bounded delivery and error codes. Include SDK version, runtime version, the operation and HTTP status in a bug report. Keep tokens, message content, form answers, private URLs and media encryption keys out of logs.

If an event triggers an external side effect, persist its operation ID. The SDK’s memory-only deduplication does not survive your process restarting.