Skip to main content

✨ Getting Started with Discord Activities

Robo.js helps you to create Discord Activities with ease, among other things.

Discord Activities are web apps that run inside Discord and can be built using HTML, CSS, and JavaScript. They use Discord's Embedded App SDK to interact with Discord APIs.

Quick Start

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

Terminal
npx create-robo <projectName> -k activity

This will spawn a new Robo.js project ready to use as a Discord Activity. We call these Robos.

How does Robo.js help?

Robo.js simplifies the process by providing features and an ecosystem of plugins to help you build your Discord Activity faster and more efficiently.

Here's what you can expect:

  • One Project: Everything is in one place, making it easy to manage. No more separate backend and frontend projects.
  • Integrated Database: Robo.js has an built-in KV database that can be pointed to any data source via adapters.
  • TypeScript Support: TypeScript works out of the box, so you can use it without any setup.
  • Built-in Tunnels: The Robo CLI automatically sets up free Cloudflare tunnels for easy testing.
  • Plugin System: Extend your activity's features with plugins that integrate seamlessly.
  • Easy Hosting: Deploy your activity with just one command for others to use, or self-host it on your own.
  • Ecosystem: A growing ecosystem of plugins, templates, and tools to help you build faster with less effort.

Documentation

Discord Activities are like web apps, but there are a few unique things you should know.

These docs cover everything you need to know about creating Discord Activities with Robo.js, from setting up your project to adding features and deploying it for others to use.

Tutorials

Creating Discord Activities is easy to learn, but we also have tutorials to help you get started quickly.

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/sync

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's SDK, and more.

AI Plugin

Sage is powered by @robojs/ai

Frequently Asked Questions

• Do I need to use Robo.js for the bot if I use it for my activity?

No, you can keep your bot and activity separate. Robo.js is designed for both, but you can use it for either if you prefer.

• Where can I see my activity in Discord?

Join a voice channel and click on the "Activities" button in the bottom left corner of the screen, or on the bottom right in some text channels. You can then select your activity from the list.

• How do I add multiplayer functionality to my activity?

Use your backend to manage game state and player interactions. Check out our multiplayer docs, tutorial, or @robojs/sync for more info.

• How do I keep my activity running for others to use?

You can deploy your activity to RoboPlay with the deploy command. This will keep your activity online 24/7 for others to use.

• I'm getting an entry point command error and can't find a launch button. What should I do?

Discord recently changed the way activities are launched. Activities created before this change may not work as expected. You can try creating a new activity or updating your existing one to fix this issue.

• I'm getting Content Security Policy (CSP) errors. How do I fix them?

Follow the Discord Proxy rules to resolve CSP issues. You may need to map external URLs or create a proxy to handle requests.

• OAUTH2 Error: invalid_request: Missing "redirect_uri" in request

This error occurs when the redirect URI is, well... missing. Make sure you have the correct redirect URI in your Discord Developer Portal OAuth section.

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