Skip to main content

✨ Getting Started with Discord Bots

Robo.js makes building bots with Discord.js as easy as placing files in the right place.

Create a Slash Command by making a file in /src/commands; the file name becomes the command. Context Commands and Events? Just as easy! This is more than just a command handler - it's a full-fledged Framework and Ecosystem.

Got an existing bot? See the Migration Guide.

Robo.js does not replace Discord.js!

Instead, it simplifies development by managing your project. You still have all of Discord.js!

Quick Start

Ready to start your adventure? Try Create Robo in your terminal:

Terminal
npx create-robo <projectName>

This will help spawn a new Robo.js project as a Discord Bot. We call these Robos.

Documentation

If you already know Discord.js, then you already know Robo.js... almost.

You can develop using the same Discord.js you know and love, but you also get access to unique features. This documentation covers everything you need to know about creating Discord Bots with Robo.js.

Not sure where to start? See the Beginner Guide.

Plugin Power Ups

Robo Plugins are special. They let you add features to your Robo with one command.

Terminal
npx robo add @robojs/ai @robojs/moderation

Plugins integrate seamlessly thanks to the Robo File Structure. What's more, anyone can create a plugin.

Community

Join our server to chat with other developers, ask questions, and share your projects.

Our very own Robo, Sage, is there to answer any questions about Robo.js, Discord.js, and more.

puzzle-outlinePlugin

Sage is powered by @robojs/ai

Frequently Asked Questions

Can I use my existing code?

Yes! Robo.js is built on top of Discord.js and is fully compatible with existing bots. Check out the Migration Guide for more info.

Can I use any database? Am I forced to use Flashcore?

Robo.js is database agnostic. You can use any database you like, including Flashcore, MongoDB, or even a simple JSON file.

We recommend Flashcore for its simplicity, but more mature projects may benefit from a more robust database like MySQL or PostgreSQL. We have Templates for those!

Do I have to use TypeScript?

Nope! Robo.js supports both JavaScript and TypeScript. You can use either or both in the same project.

When creating a new project, uncheck the TypeScript option if you want to use JavaScript. You can always add it later.

How do I register my commands?

You don't!

Robo.js automatically registers your commands when you create them in the /src/commands directory. It internally uses a manifest to keep track of changes and only register when necessary.

Should I still create my own client?

Nope, Robo.js handles the client for you. Configure it in /config/robo.mjs and import it via import { client } from 'robo.js'.

What is ESM? Why can't I use require?

ESM (ECMAScript Modules) is the new standard for JavaScript modules. Robo.js exclusively uses ESM.

import is more powerful than require and allows for better tree-shaking and static analysis.

Learn More

Robo.js has a lot to offer for such a tiny framework with zero dependencies.

Robo.js Logo

MIT © 2024 Robo.js By WavePlay