LogoRobo.js

@robojs/dev

Development tools that safely disappear in production.

Install @robojs/dev with:

Development utilities for forwarding errors to Discord, viewing logs, and checking Robo status. Install during development, and the plugin automatically strips itself from production builds.

Features

Error Forwarding

Send errors to a Discord channel with dismiss and restart buttons

Slash Commands

/dev commands for logs, status, and restart

Auto-strip Production

Plugin disappears from builds automatically

Log Viewer

View recent Robo logs from Discord

Debug Channel

Dedicated channel for error embeds and role pings

Installation

To install, run:

npx robo add @robojs/dev@next

Or create a new project with the plugin pre-installed:

npx create-robo@next my-project -p @robojs/dev@next

This plugin is designed for development only. It strips itself from production builds automatically, but you can also remove it manually:

npx robo remove @robojs/dev@next

How it works

The plugin hooks into Robo's build system with a transform that filters out all dev plugin entries when building for production. Run robo build and every command, event handler, and hook from this plugin disappears from the output. Zero runtime overhead in production.

In development mode (robo dev), you get the full set of tools: slash commands for viewing logs, checking status, and restarting, plus error forwarding to a Discord channel.

Quick start

The simplest setup is adding a debug channel for error forwarding. Set the DISCORD_DEBUG_CHANNEL_ID environment variable:

.env
DISCORD_DEBUG_CHANNEL_ID=1234567890123456789

When an unhandled error occurs, the plugin sends a rich embed to that channel with the full stack trace and interactive buttons to dismiss the error or restart the process.

For more control, use the plugin config:

config/plugins/robojs/dev.mjs
export default {
	debugChannelId: '1234567890123456789',
	errorPingRoleId: '987654321098765432'
}
config/plugins/robojs/dev.mjs
export default {
	debugChannelId: '1234567890123456789',
	errorPingRoleId: '987654321098765432'
}

Next steps

On this page