-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(create-discord-activity): updated readme
- Loading branch information
Showing
1 changed file
with
5 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,10 @@ | ||
<p align="center">✨ <strong>Generated with <a href="https://roboplay.dev/create-robo">create-robo</a> magic!</strong> ✨</p> | ||
<p align="center">✨ <strong>Generated with <a href="https://roboplay.dev/create-robo">create-robo</a> magic!</strong> (that's right) ✨</p> | ||
|
||
--- | ||
|
||
# Hiya, create-discord-activity 🌈 | ||
# create-discord-activity | ||
|
||
Welcome to your fresh **[Robo.js](https://github.com/Wave-Play/robo)** project! | ||
This is an alias for **[`create-robo`](https://robojs.dev/create-robo)** with the `activity` kit pre-selected. | ||
|
||
Embark on a journey where your Discord projects transcend the ordinary. With Robo.js as your guide, you'll experience a seamless, [file-based setup](https://docs.roboplay.dev/docs/basics/overview#the-robojs-file-structure), an [integrated database](https://docs.roboplay.dev/docs/basics/flashcore), [TypeScript support](https://docs.roboplay.dev/docs/advanced/typescript), and a multitude of [plugin-powered skills](https://docs.roboplay.dev/docs/advanced/plugins) to unlock along the way. | ||
|
||
Ready to embark on this adventure? | ||
|
||
➞ [📚 **Documentation:** Getting started](https://docs.roboplay.dev/docs/getting-started) | ||
|
||
➞ [🚀 **Community:** Join our Discord server](https://roboplay.dev/discord) | ||
|
||
## Running 🏃♂️ | ||
|
||
Run development mode with: | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
Your Robo refreshes with every change. 🔄 | ||
|
||
> **Psst...** Check out the [deployment instructions](#deployment) to keep your Robo online 24/7. | ||
## Developing 🏗️ | ||
|
||
Create new slash commands by making a new file under the `/src/commands` directory with an exported default function. The file's name becomes the command's name. You can either use the `interaction` parameter or return the result to let Sage handle it for you. For more info on commands, see the **[Discord.js Documentation](https://discord.js.org/#/docs/main/stable/general/welcome)**. | ||
|
||
Commands will be automatically registered with Discord when needed, but you can force it by running `npx robo build -f`. | ||
|
||
To listen to new events, create a file named after the event in `/src/events`. For example, `typingStart.js` will notify you when someone starts typing. You can stack multiple files for the same event by making a directory named after the event. Files inside it can be named whatever you want. For example: | ||
|
||
``` | ||
- src | ||
- events | ||
- typingStart | ||
- your-file.js | ||
- another.js | ||
``` | ||
|
||
**➞** [📚 **Documentation:** Slash commands](https://docs.roboplay.dev/docs/advanced/plugins#creating-plugins) | ||
|
||
**➞** [📚 **Documentation:** Events](https://docs.roboplay.dev/docs/advanced/events) | ||
|
||
**➞** [📚 **Documentation:** Context Menus](https://docs.roboplay.dev/docs/basics/context-menu) | ||
|
||
## Debugging 🐞 | ||
|
||
Got bugs? No biggie! Robo.js has your back with nifty built-in debugging magic. During dev mode, Robo will provide you with error information, stack traces, interactive logs, and even a sneak peek at the exact code that caused the issue! | ||
|
||
To get started, set up a personal Discord server for your Robo to hang out in and add your server's ID as a `DISCORD_GUILD_ID` env variable. Doing this unlocks the fab debugging features, plus the super-handy `/dev` command that gives you quick access to logs, system info, and more. | ||
|
||
**➞** [📚 **Documentation:** Debugging](https://docs.roboplay.dev/docs/advanced/debugging) | ||
|
||
## Configuration ⚙️ | ||
|
||
Robo.js automatically handles creating your Discord.js `Client` instance, but you can still configure what gets passed to it using the `config/robo.mjs` file. Use it to add more intents or change the behavior of other Robo.js features such as Sage. | ||
|
||
The `.env` file contains your `DISCORD_TOKEN` and `DISCORD_CLIENT_ID`. Keep these secret. You can get these values from the **[Discord Developer Portal](https://discord.com/developers/applications)**. | ||
|
||
## Plugins 🔌 | ||
|
||
This Robo boasts an intuitive plugin system that grants new capabilities instantly! | ||
|
||
```bash | ||
npx robo add @robojs/ai | ||
``` | ||
|
||
> Swap out [`@robojs/ai`](https://github.com/Wave-Play/robo.js/tree/main/packages/plugin-ai) with your chosen plugin's package name | ||
With that, your Robo automatically equips itself with all the features the plugin offers. Want to revert? Simply use [`robo remove`](https://docs.roboplay.dev/docs/advanced/command-line#plugins) to uninstall any plugin. | ||
|
||
**➞** [📚 **Documentation:** Installing plugins](https://docs.roboplay.dev/docs/advanced/plugins#installing-plugins) | ||
|
||
Crafting something unique in your Robo project? You can turn your innovations into plugins, be it specific functionalities or your entire Robo. Share your genius with the world! | ||
|
||
**➞** [📚 **Documentation:** Creating plugins](https://docs.roboplay.dev/docs/advanced/plugins#creating-plugins) | ||
|
||
## Deployment 🚀 | ||
|
||
Run the `deploy` command to automatically deploy to **[RoboPlay](https://roboplay.dev)** once you're ready to keep your robo online 24/7. | ||
|
||
```bash | ||
npm run deploy | ||
``` | ||
|
||
**➞** [🚀 **RoboPlay:** Hosting your Robo](https://docs.roboplay.dev/docs/hosting) | ||
|
||
You can also self-host your robo anywhere that supports Node. Just make sure to run `build` followed by `start`: | ||
|
||
```bash | ||
npm run build | ||
npm start | ||
``` | ||
|
||
You can also run `invite` (beta) to automatically generate a server invite to test it yourself or show it off! You can also use the **[Discord Developer Portal](https://discord.com/developers/applications)** to generate an invite as usual. | ||
|
||
```bash | ||
npm run invite | ||
``` | ||
|
||
Happy coding! 🎉 | ||
- [**📚 Documentation**: Robo.js](https://robojs.dev) | ||
- [**📚 Documentation**: Create Robo](https://robojs.dev/create-robo) |