Skip to main content

@robojs/dev

Welcome to @robojs/dev! For developers fine-tuning their Robo.js projects, this plugin is a must-have. Seamlessly test Robo APIs, monitor resources, and emulate specific Robo behaviors, all in one package. Just install, and you're ready to go!

Installation 💻

To integrate this plugin into your project, simply navigate to your Robo directory and input:

npx robo add @robojs/dev

Voilà! Your Robo is now supercharged with development tools.

⚠️ Important Note

This plugin is crafted explicitly for development environments. Before deploying your Robo, ensure you uninstall this plugin to prevent users from directly manipulating your server or database.

Execute the following to safely remove:

npx robo remove @robojs/dev

Commands

Equip your Robo with the following commands for an enhanced development experience:

CommandDescription
/devtools example deferDemonstrates Sage's auto deferral feature, showcasing varying behaviors.
/devtools example errorIntentionally triggers an error, either asynchronous or not—great for validating Sage's debug mode setup.
/devtools example permission-dmIllustrates slash command usage outside of direct messages.
/devtools flashcore clearCaution! Wipes out all Flashcore values.
/devtools flashcore deleteRemoves a specific key from Flashcore.
/devtools flashcore getRetrieves the current value of a Flashcore key.
/devtools flashcore setAssigns a value to a Flashcore key.
/devtools flashcore watchObserves key changes, highlighting differences and sending notifications.
/devtools module checkConfirms if a particular module is active.
/devtools module setToggles a module's active state.
/devtools state getFetches a state value.
/devtools state setAlters a state value.

For those eager to delve deeper into Robo APIs, inspecting the plugin's source code provides good usage examples. Trust us, it's simpler than you may think!

Resource monitoring

Efficiency is key! The DevTools plugin also empowers you with a mechanism to supervise CPU and RAM utilization over time. This resource monitoring is instrumental in gauging the performance of your Robo and pin-pointing areas for enhancement.

To enable this feature, set monitorResources to true in the plugin's configuration. By default, the plugin will check resources every 5 seconds, but you're free to adjust the monitorInterval:

export default {
monitorInterval: 10_000, // Inspects every 10 seconds
monitorResources: true // Activates resource monitoring
}

Yet to set foot in the Robo.js universe? Embark on your Robo journey now!

Level up your development process with Robo.js and the DevTools plugin! 🚀

More on GitHub

Robo.js Logo

MIT © 2024 Robo.js By WavePlay