β¨ 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:
npx create-robo <projectName>
This will help spawn a new Robo.js project as a Discord Activity. We call these Robos.
π Templates
Kickstart your project with a template.
π Tutorial
How to create a Discord Activity in seconds.
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.
π Authentication
Customize your user experience.
π Credentials
Secure your Discord Activity credentials.
π‘οΈ Discord Proxy
Things to know about Discord's Proxy.
π Hosting
Deploy your activity for others to use.
βοΈ Multiplayer
Add multiplayer functionality to your Discord Activity.
Tutorialsβ
Creating Discord Activities is easy to learn, but we also have tutorials to help you get started quickly.
π How to Build a Discord Activity
Create a Discord Activity in seconds.
π Add Multiplayer to Your Activity
Create a real-time multiplayer Discord Activity.
π Achieve Game-like Scaling
Scale your Discord Activity like a game.
π Fix Stuck DiscordSDK Ready Event
Prevent the .ready() function from getting stuck.
π Resolve CSP Issues with a Proxy
Use a Node.js proxy to resolve CSP issues.
π More Tutorials
Explore more tutorials for Discord Activities.
Plugin Power Upsβ
Robo Plugins are special. They let you add features to your Robo with one command.
npx robo add @robojs/ai @robojs/sync
Plugins integrate seamlessly thanks to the Robo File Structure. What's more, anyone can create a plugin.
π Robo Plugins
Add features to your Robo seamlessly.
ποΈ Plugin Directory
Browse plugins for your Robo.
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.
Sage is powered by @robojs/ai
Frequently Asked Questionsβ
Do I need to use Robo.js for my bot if I use it for my activity?
Nope, 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.