Robo.js v0.10 is here - more than just Discord.js bots
Tags: javascript, node, programming, discord
Published: 2024-04-16 13:30:00

We're excited to announce the release of Robo.js v0.10 - our biggest update yet! 🎉

There's a lot to unpack, so we'll cover new features in future posts. However, there's some important changes you should know about right now.

> **Not familiar with Robo.js?** It's a framework for creating Discord.js bots with ease and best practices by default. Plugins extend your bot's features right away! Also, you can [**create Discord Activities with Robo.js**](https://dev.to/waveplay/how-to-build-a-discord-activity-easily-with-robojs-5bng) now! 🚀

## New Package Names

We've changed the core package name from `@roboplay/robo.js` to `robo.js`! We feel like this fancy new name is much easier to remember and type. **Many thanks to the previous owner of `robojs` for letting us use the name!**

Yes, this means you'll need to update your `package.json` and `import` statements. But trust us, it's worth it!

## New Plugin Names

We've also updated our plugin names to be more consistent and easier to remember. Here are the new names:

- `@roboplay/plugin-ai` ➞ `@robojs/ai`
- `@roboplay/plugin-ai-voice` ➞ `@robojs/ai-voice`
- `@roboplay/plugin-api` ➞ `@robojs/server`
- `@roboplay/plugin-better-stack` ➞ `@robojs/better-stack`
- `@roboplay/plugin-devtools` ➞ `@robojs/dev`
- `@roboplay/plugin-modtools` ➞ `@robojs/moderation`

We've also deprecated the `@roboplay/plugin-poll` plugin now that Discord has built-in polls. You can still use the plugin, but we recommend using Discord's feature instead.

## Breaking Changes

Of course, with a new 0.x release, there are some breaking changes. We've tried to keep these to a minimum, but here are the most important ones:

- **Removed legacy runtime**: We've removed the old process-based runtime in favor of the worker thread-based runtime introduced in v0.8. The thread-based runtime has been the default since v0.9, so this change shouldn't affect most users.
- **Removed old `robo.config.mjs` support**: We've removed support for the old `robo.config.mjs` configuration file. It was never recommended to use this file, but if you were, you'll need to switch to the standard `/config/robo.mjs` file.
- **Moved heartbeat**: We've removed the redundant heartbeat feature that previously built into Robo.js. The `@robojs/better-stack` plugin already provides a more robust solution for this, so use that instead if you need heartbeat functionality.
- **Moved `robo doctor` command**: The `robo doctor` command has been moved to the `@roboplay/sage` CLI tool.

These changes should affect very few users, but we wanted to make sure you were aware of them. Clean ups like these help us keep Robo.js lean and mean!

## Upgrading to v0.10

Normally, you'd be able to run `robo upgrade` to upgrade to the latest version of Robo.js. However, due to the breaking changes in this release, we recommend uninstalling and reinstalling Robo.js to ensure a clean upgrade.

Here's how you can do that:

```bash
npm uninstall @roboplay/robo.js
npm install robo.js
```

Don't forget to update your `import` statements as well!

Plugins can be updated in a similar way:

```bash
npx robo add @robojs/ai
npx robo remove @roboplay/plugin-ai
```

We recommend adding the new plugin before removing the old one to get a chance to copy over any configuration files or data.

## What's Next?

We're excited to show what else is new in Robo.js v0.10! Stay tuned for more posts covering the new features and improvements.

Need help upgrading or have questions about the new release? Feel free to **[ask us in our Discord server](https://roboplay.dev/discord)**. ✨