### Building and Starting Robo.js for Self-Hosting Source: https://github.com/wave-play/robo.js/blob/main/packages/plugin-api/__benchmarks__/robo-server/README.md Commands to build your Robo.js project and start it for self-hosting. `npx robo build` prepares the project, and `npm start` (or `robo start`) runs the bot. ```bash npx robo build npm start ``` -------------------------------- ### Robo.js Server Plugin - Getting Started Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/plugins/server.mdx A guide to creating your first API route by adding a JavaScript file in the `/src/api` directory. Demonstrates a simple 'Hello World' example. ```APIDOC ## Getting Started Create a new API route by adding a file in `/src/api`. For example, creating `hello.js` with the following content: ```javascript export default () => { return 'Hello World!' } ``` Now, run your Robo and visit `http://localhost:3000/api/hello` to see the route in action. ``` -------------------------------- ### Add Robo.js Plugins via Terminal Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/getting-started.mdx This command allows you to add plugins to your existing Robo.js project. For example, 'robo add @robojs/ai @robojs/server' installs the AI and server plugins. Plugins enhance your Robo's functionality. ```bash robo add @robojs/ai @robojs/server ``` -------------------------------- ### Create New Robo.js Discord Activity Project Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/discord-activities/getting-started.mdx Use the Robo.js CLI to generate a new project for a Discord Activity. This command initializes a new Robo.js project, simplifying the setup process for creating Discord Activities. It takes the project name as an argument. ```bash npx create-robo ``` -------------------------------- ### Install Dependencies and Run Dev Server Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/web-apps/discord-auth-ts.mdx Commands to install project dependencies and start the development server for the Robo.js application. This is a standard step after scaffolding a new project. ```bash npm install npm run dev ``` -------------------------------- ### Server Setup and Management Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/ref/@robojs/server/_index.md Provides functions for getting the server engine and managing the server's readiness. ```APIDOC ## getServerEngine ### Description Retrieves the underlying server engine instance used by Robo.js. ### Method GET ### Endpoint /getServerEngine ### Parameters None ### Request Example ``` GET /getServerEngine ``` ### Response #### Success Response (200) - **engine** (object) - The server engine instance. #### Response Example ```json { "engine": {} } ``` ## ready ### Description Signals that the server is ready to handle requests. This function is typically called after all routes and handlers have been configured. ### Method POST ### Endpoint /ready ### Parameters None ### Request Example ``` POST /ready ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the server is ready. #### Response Example ```json { "message": "Server is ready." } ``` ``` -------------------------------- ### Run Robo.js Bot Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/discord-bots/beginner-guide.mdx This command initiates the development server for a Robo.js bot. Ensure you have Node.js installed and your bot's credentials are configured. ```bash npm run dev ``` -------------------------------- ### Run Robo.js Development Server Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/discord-activities/beginner-guide.mdx Start the development server for your Robo.js project. This command is used to run the project locally and test your Discord Activity during development. ```bash npm run dev ``` -------------------------------- ### Create Robo.js Project for Discord Activity Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/discord-activities/beginner-guide.mdx Use the Robo.js CLI to spawn a new project configured as a Discord Activity. This command initiates the project setup process, making it ready for development. ```bash {''} ``` -------------------------------- ### Create Robo Project with Discord Auth Template (Bash) Source: https://github.com/wave-play/robo.js/blob/main/templates/web-apps/discord-auth-ts/README.md Scaffolds a new Robo.js project using the web-app/discord-auth-ts template. Requires npx to be installed. Installs dependencies and starts the development server. ```bash npx create-robo --template web-apps/discord-auth-ts --name cd npm install npm run dev ``` -------------------------------- ### Create Robo Project with Plugins Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/plugins/install.mdx Creates a new Robo.js project with specified plugins pre-installed. This command streamlines the initial setup of a project with desired functionalities. ```bash robo new --plugins @robojs/ai @robojs/server ``` -------------------------------- ### Add Robo.js Plugins with CLI Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/discord-bots/getting-started.mdx Installs Robo.js plugins to extend bot functionality. These plugins integrate seamlessly into the Robo File Structure, allowing for easy feature additions like AI or moderation. ```bash npx robo add @robojs/ai @robojs/moderation ``` -------------------------------- ### Create API Route (Javascript) Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/discord-activities/beginner-guide.mdx Defines a simple 'Hello, World!' API route in Javascript. This serves as a basic example for creating custom API endpoints within your Robo.js application. ```javascript export default () => { return 'Hello, World!' } ``` -------------------------------- ### Deploy Robo.js Project with RoboPlay Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/hosting/roboplay.mdx This command optimizes and deploys your Robo.js project to RoboPlay. It guides first-time users through a setup process and can be used to update existing deployments. RoboPlay hosts your project on their infrastructure. ```bash npx robo deploy ``` -------------------------------- ### Create Basic Slash Command in Robo.js Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/discord-bots/beginner-guide.mdx Defines a simple '/hello' slash command that returns 'Hello World!'. Robo.js automatically handles command registration. This example uses JavaScript. ```javascript export default () => { return 'Hello World!' } ``` -------------------------------- ### Robo.js Frontend Client (React) Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/discord-activities/beginner-guide.mdx Example of a basic frontend client component for a Robo.js Discord Activity using React and the useDiscordSdk hook. It displays a simple greeting and assumes authentication with the Discord SDK. ```jsx import { useDiscordSdk } from '../hooks/useDiscordSdk' export const Activity = () => { const { authenticated, discordSdk } = useDiscordSdk() return (
Discord

Hello, World

) } ``` -------------------------------- ### Create Basic Slash Command (TypeScript) Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/discord-bots/beginner-guide.mdx Defines a simple '/hello' slash command that returns 'Hello World!' using TypeScript. Robo.js automatically handles command registration. This example includes type definitions. ```typescript import type { CommandResult } from 'robo.js' export default (): CommandResult => { return 'Hello World!' } ``` -------------------------------- ### Install @robojs/i18n Plugin Source: https://github.com/wave-play/robo.js/blob/main/packages/@robojs/i18n/README.md Instructions for adding the @robojs/i18n plugin to an existing Robo project using npx, or starting a new project with the plugin preinstalled. ```bash npx robo add @robojs/i18n ``` ```bash npx create-robo -p @robojs/i18n ``` -------------------------------- ### Create Robo.js Project with @robojs/giveaways Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/plugins/giveaways.mdx Initialize a new Robo.js project and include the @robojs/giveaways plugin from the start. This command simplifies project setup for new users. ```bash -p @robojs/giveaways ``` -------------------------------- ### Running Development Mode in Robo.js Source: https://github.com/wave-play/robo.js/blob/main/packages/create-robo/docs/robo-readme.md This command initiates the development server for your Robo.js project, allowing for live updates and testing. It's the primary way to run your bot during development. ```bash npm run dev ``` -------------------------------- ### Create Robo.js Project with React TS Template Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/web-apps/react-ts.mdx This command initializes a new Robo.js project using the web-apps/react-ts template. Replace with your desired project name. It's the first step in setting up your development environment. ```bash --template web-apps/react-ts --name ``` -------------------------------- ### Create New Robo Project Interactively Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/cli/create-robo.mdx Launches the interactive CLI to create a new Robo.js project named 'my-awesome-robo'. The CLI will guide the user through setup steps like language selection and feature choices. ```bash my-awesome-robo ``` -------------------------------- ### Add Robo.js Plugins using npm Source: https://github.com/wave-play/robo.js/blob/main/packages/create-robo/docs/robo-readme-app.md This command demonstrates how to add new plugins to your Robo.js project using npx. It shows adding the '@robojs/ai' and '@robojs/sync' plugins, which can extend your project's functionality seamlessly. ```bash npx robo add @robojs/ai @robojs/sync ``` -------------------------------- ### Robo.js Automatic .env Loading Example Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/robojs/environment-variables.mdx Demonstrates how Robo.js automatically loads .env variables, which can be accessed directly via process.env. This is the default behavior when your project starts. ```javascript export default () => { // This is EXAMPLE_VARIABLE in your .env file console.log(process.env.EXAMPLE_VARIABLE) } ``` -------------------------------- ### Creating Robo.js Slash Commands Source: https://github.com/wave-play/robo.js/blob/main/packages/plugin-api/__benchmarks__/robo-server/README.md Example of creating a slash command in Robo.js by exporting a default function in a file within the `src/commands` directory. The file name determines the command name. ```javascript // src/commands/myCommand.js export default ({ interaction }) => { // Your command logic here return "Hello from my command!"; }; ``` -------------------------------- ### Create Robo Project with Template Source: https://github.com/wave-play/robo.js/blob/main/CONTRIBUTING.md Example of creating a new Robo.js project using the create-robo tool with a specific template. This command-line interface (CLI) tool simplifies project setup. Ensure you have Node.js and npx (which comes with npm) installed. ```bash npx create-robo my-robo --template starter-activity-typescript ``` -------------------------------- ### Install @robojs/dev Plugin Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/plugins/dev.mdx Command to install the @robojs/dev plugin into your Robo.js project. This adds the development tools to your existing Robo setup. ```bash robo add @robojs/dev ``` -------------------------------- ### Command Layer: /roadmap setup Source: https://github.com/wave-play/robo.js/blob/main/packages/@robojs/roadmap/AGENTS.md Admin-only command to set up forums, write settings, and create a stateful setup message. ```APIDOC ## Command: /roadmap setup ### Description Initiates the setup process for the roadmap feature. This command is restricted to administrators and is responsible for creating/getting forums, writing settings, and building an interactive setup message with toggles and role selection. ### Location `src/commands/roadmap/setup.ts` ### Usage `/roadmap setup` ### Permissions Admin only. ``` -------------------------------- ### Install Local Robo.js Plugin Source: https://github.com/wave-play/robo.js/blob/main/packages/@robojs/ai/DEVELOPMENT.md Installs a Robo.js plugin from a local directory into a test robo project. This command is used during development to test the plugin before publishing. ```bash npm install /path/to/plugin-ai ``` -------------------------------- ### Build and Start Robo.js Project for Self-Hosting Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/hosting/overview.mdx These commands are used for self-hosting your Robo.js project. `robo build` prepares your project for production, and `robo start` runs the optimized production build. Ensure you do not use `robo dev` in production. ```bash robo build robo start ``` -------------------------------- ### Create Robo.js Project with Starter Plugin (JS) Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/plugins/starter-js.mdx Use this command to create a new Robo.js project using the starter JavaScript template. Replace `` with your desired project name. This sets up a basic project structure for you to build upon. ```bash --template plugins/starter-js --name ``` -------------------------------- ### Plugin Configuration Examples Source: https://github.com/wave-play/robo.js/blob/main/packages/@robojs/analytics/GEMINI.md Examples demonstrating how to configure the analytics plugin. ```APIDOC ## Plugin Configuration Examples ### Description These examples illustrate different ways to configure the `@robojs/analytics` plugin in your `robo.mjs` or equivalent configuration file. ### Custom Engine To use a completely custom analytics engine: ```typescript import { BaseEngine } from '@robojs/analytics' // Define your custom engine class MyEngine extends BaseEngine { async event(name: string, options?: any) { /* ... implementation ... */ } async view(page: string, options?: any) { /* ... implementation ... */ } } // Export the plugin configuration with your custom engine export default { engine: new MyEngine() } ``` ### Multiple Engines (ManyEngines) To use both Google Analytics and Plausible Analytics simultaneously: ```typescript import { GoogleAnalytics, PlausibleAnalytics, ManyEngines } from '@robojs/analytics' export default { engine: new ManyEngines(new GoogleAnalytics(), new PlausibleAnalytics()) } ``` **Note:** Ensure necessary environment variables (`GOOGLE_ANALYTICS_MEASURE_ID`, `GOOGLE_ANALYTICS_SECRET`, `PLAUSIBLE_DOMAIN`) are set for the respective engines when using them. ``` -------------------------------- ### Example EmailBuilder: Conditional Sending Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/ref/@robojs/auth/TypeAlias.EmailBuilder.md An example of an EmailBuilder that conditionally returns null to prevent sending an email if the user's IP address is internal (starts with '192.168.'). Otherwise, it calls an adminAlert function. ```TypeScript ctx => ctx.session?.ip?.startsWith('192.168.') ? null : adminAlert(ctx) ``` -------------------------------- ### Roadmap Setup Command Source: https://github.com/wave-play/robo.js/blob/main/packages/@robojs/roadmap/CLAUDE.md Documentation for the `/roadmap setup` command, used by administrators to configure forums and settings. ```APIDOC ## `/roadmap setup` ### Description (Admin only) Configures and sets up roadmap forums, settings, and a stateful setup message with interactive elements. ### Location `src/commands/roadmap/setup.ts` ### Usage This command is intended for administrators to initialize or modify roadmap configurations within a guild. ``` -------------------------------- ### Install Robo.js Plugins using CLI Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/discord-bots/docker-ts.mdx This example command shows how to install Robo.js plugins using the `robo add` command in the terminal. This is a convenient way to extend your bot's functionality with pre-built features. ```bash robo add @robojs/ai @robojs/moderation ``` -------------------------------- ### Install Local Robo.js Plugin Source: https://github.com/wave-play/robo.js/blob/main/packages/plugin-better-stack/DEVELOPMENT.md Installs a Robo.js plugin from a local directory into a test Robo project. This is useful for testing plugin changes during development. Ensure you replace the placeholder path with the actual directory of your plugin. ```bash npm install /path/to/@robojs/better-stack ``` -------------------------------- ### Build and Start Robo.js Application Source: https://github.com/wave-play/robo.js/blob/main/templates/web-apps/next-auth-ts/README.md Commands to build the Next.js and Robo.js server and then start the application. Assumes npm is used for package management. ```bash npm run build npm start ``` -------------------------------- ### Create Robo.js Discord Bot Project Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/discord-bots/starter-js.mdx Command to create a new Discord bot project using the Robo.js starter template. Requires specifying the template and a project name. ```bash --template discord-bots/starter-js --name ``` -------------------------------- ### Generating Bot Invite Link Source: https://github.com/wave-play/robo.js/blob/main/packages/plugin-api/__benchmarks__/robo-server/README.md Command to generate an invite link for your bot, useful for testing or sharing. ```bash npx robo invite ``` -------------------------------- ### Robo.js Event Handling Example (src/events/typingStart.js) Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/discord-bots/purrth-vader-ts.mdx Example of how to create an event handler for Robo.js. This file, named `typingStart.js` within the `src/events` directory, would trigger when a user starts typing. Multiple files can exist within an event directory for modularity. ```javascript // src/events/typingStart.js export default function ( { logger } // Assuming logger is available in the context ) { logger.info('Someone started typing!'); } ``` -------------------------------- ### Start Sync Server (Node.js) Source: https://github.com/wave-play/robo.js/blob/main/packages/plugin-sync/AGENTS.md Shows how to start the SyncServer and retrieve the underlying WebSocket server instance. This is typically done after the main server is ready. ```typescript import { SyncServer } from '@robojs/sync/server.js' SyncServer.start() const wss = SyncServer.getSocketServer() ``` -------------------------------- ### Setup @robojs/sync Plugin Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/discord-activities/multiplayer.mdx Installs the @robojs/sync plugin using the Robo.js CLI. This plugin facilitates real-time state synchronization for Discord Activities. ```bash robo add @robojs/sync ``` -------------------------------- ### Start Robo.js Development Server Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/plugins/roadmap.mdx Starts the Robo.js development server. Once the server is running and environment variables are configured, you can use Discord commands to manage your roadmap. ```bash robo dev ``` -------------------------------- ### Start Robo.js Project (CLI) Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/web-apps/react-js.mdx Command to start the Robo.js application after building it. This is used for self-hosting the project. ```bash npm start ``` -------------------------------- ### Robo.js Mode Type Declaration: get() Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/ref/framework/Variable.Mode.md Type declaration for the `get` function in Robo.js modes. This function returns the name of the current mode the Robo instance is operating in, typically set via the `--mode` CLI flag. Defaults to 'production' for `robo start` and 'development' for `robo dev`. ```typescript get: () => string; ``` -------------------------------- ### Example: Basic User ID Retrieval Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/ref/@robojs/auth/Function.listPrismaUserIds.md Demonstrates how to call listPrismaUserIds with basic pagination options to get a specific page of user IDs. ```typescript const { ids, pageCount } = await listPrismaUserIds(prisma, { page: 0, pageSize: 100 }) ``` -------------------------------- ### Create Robo.js Discord Bot Project Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/discord-bots/starter-ts.mdx Command to create a new Robo.js Discord bot project using the starter template. Replace with your desired project name. ```bash npx create-discordjs-bot --template discord-bots/starter-ts --name ``` -------------------------------- ### Adding Robo.js Plugins Source: https://github.com/wave-play/robo.js/blob/main/packages/plugin-api/__benchmarks__/robo-server/README.md Command to add a new plugin to your Robo.js project. Replace `@roboplay/plugin-ai` with the desired plugin package name. ```bash npx robo add @roboplay/plugin-ai ``` -------------------------------- ### Initialize 2D Game Project with Robo.js Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/discord-activities/2d-game.mdx Command to create a new Robo.js project pre-configured for a 2D game Discord Activity. Replace `` with your desired project name. This command leverages Robo.js templates for quick setup. ```bash npx robo create --template discord-activities/2d-game --name ``` -------------------------------- ### Install Robo.js Unity Template Source: https://github.com/wave-play/robo.js/blob/main/templates/discord-activities/unity/README.md Command to create a new Robo.js project using the discord-activities/unity template. Replace `` with your desired project name. ```bash npx create-robo --template discord-activities/unity --name cd npm run dev ``` -------------------------------- ### Discord Authentication Configuration in React Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/discord-activities/godot.mdx Example of configuring the `DiscordProvider` component in `App.tsx` to enable Discord authentication for your activity, specifying required scopes. ```tsx ``` -------------------------------- ### Download and Extract Example from Robo.js Repo (JavaScript) Source: https://github.com/wave-play/robo.js/blob/main/packages/create-robo/GEMINI.md Specifically downloads and extracts an example template from the main Robo.js repository (`robo.js-main/templates//`). It strips the top three directory levels to provide a clean template structure. ```javascript async function downloadAndExtractExample(root, name) { // ... implementation to download and extract specific example ... } ``` -------------------------------- ### TRPC Start Event for Router Registration Source: https://github.com/wave-play/robo.js/blob/main/packages/@robojs/trpc/CLAUDE.md Ensures the TRPC router is registered at application startup. This file is imported during the `_start` event and triggers the server-side TRPC setup, making the `appRouter` available. ```ts // Start Event: /events/_start/trpc.ts export default () => import('../../trpc/server.js') ``` -------------------------------- ### Build and Start Robo.js Application Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/web-apps/discord-auth-ts.mdx Commands to build your Robo.js project for production and start the self-hosted server. Assumes npm is used as the package manager. ```shell npm run build npm start # self-hosting ``` -------------------------------- ### Create Robo.js Unity Project Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/discord-activities/unity.mdx Command to create a new Robo.js project using the Unity activities template. Replace `` with your desired project name. ```bash npm create robo@latest --template discord-activities/unity --name cd npm run dev ``` -------------------------------- ### Backend: Get Server Session (TypeScript) Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/web-apps/discord-auth-ts.mdx Example of how to access the authenticated user's session on the server-side in a Robo.js application. It uses the getServerSession helper from @robojs/auth. ```typescript import { getServerSession } from '@robojs/auth' export default async (request: RoboRequest) => { const session = await getServerSession(request) return { user: session?.user ?? null } } ``` -------------------------------- ### Create New Project with @robojs/i18n Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/plugins/i18n.mdx Starts a new Robo.js project with the @robojs/i18n plugin preinstalled. This simplifies setup for new projects requiring internationalization from the beginning. ```bash -p @robojs/i18n ``` -------------------------------- ### Create Discord Bot Project (Bash) Source: https://github.com/wave-play/robo.js/blob/main/templates/discord-bots/starter-js/README.md Command to create a new Robo.js Discord bot project using the starter-js template. Requires npx and specifies the template and project name. ```bash npx create-robo --template discord-bots/starter-js --name cd npm run dev ``` -------------------------------- ### Accessing Environment Variables in Robo.js Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/robojs/environment-variables.mdx Shows how to access environment variables within a Robo.js command using `process.env`. This example retrieves the 'EXAMPLE_VARIABLE' and provides a fallback if it's not found. ```javascript export default () => { return process.env.EXAMPLE_VARIABLE ?? 'No secret found!' } ``` -------------------------------- ### Environment File Example Source: https://github.com/wave-play/robo.js/blob/main/packages/plugin-better-stack/GEMINI.md Provides an example of how to configure environment variables in a .env file. ```APIDOC ## Environment File Example ### Description This example demonstrates the structure of a `.env` file for configuring Better Stack integration. ### File: `.env` ```env BETTER_STACK_SOURCE_TOKEN="your_source_token_here" BETTER_STACK_INGESTING_HOST="in-eu.logtail.com" ``` ### Important Note Always add your `.env` file to `.gitignore` to prevent accidentally committing sensitive credentials. ``` -------------------------------- ### POST /api/roadmap/forum/:guildId/setup Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/plugins/roadmap.mdx Sets up the forum structure for a given guild. ```APIDOC ## POST /api/roadmap/forum/:guildId/setup ### Description Sets up the forum structure for a given guild. ### Method POST ### Endpoint /api/roadmap/forum/:guildId/setup ### Parameters #### Path Parameters - **guildId** (string) - Required - The ID of the guild to set up the forum for. #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **data** (object) - Endpoint-specific data (e.g., confirmation message). #### Response Example ```json { "success": true, "data": { "message": "Forum setup complete for guild X." } } ``` ``` -------------------------------- ### Unity Discord Bridge Configuration Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/discord-activities/unity.mdx Steps to integrate Dissonity into a Unity project and configure the build for Robo.js. This involves installing Dissonity via Git URL and setting up the Discord Bridge. ```plaintext 1. Go to `Window` > `Package Manager` > `Add package from git URL` 2. Install the package from https://github.com/Furnyr/Dissonity/tree/v1/unity 3. Right click in the hierarchy, Dissonity > Discord Bridge 4. In Unity, go to `File` > `Build Settings`. 5. Choose `WebGL` as the platform. 6. Click `Build`. 7. Navigate to your Robo project's `public` folder. 8. Open the `index.html` file. 9. Add `let unityInstance;` before `createUnityInstance`. 10. In the `then` block of `createUnityInstance`, change the parameter name to `ui` and set `unityInstance = ui;`. ``` -------------------------------- ### Staging Environments with Robo.js Modes Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/robojs/mode.mdx This command demonstrates setting up a 'staging' mode for testing purposes in Robo.js. By running `robo start --mode staging`, you can utilize `.env.staging` files to point to different databases or services, allowing for thorough testing before deploying to the production environment. ```bash robo start --mode staging ``` -------------------------------- ### Create Robo.js Discord Activity Project Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/templates/discord-activities/godot.mdx Command to create a new Robo.js Discord Activity project using the Godot template. Replace `` with your desired project name. ```bash npm create robo@latest --template discord-activities/godot --name ``` -------------------------------- ### Create Robo.js Project with TypeScript Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/robojs/typescript.mdx This command initiates a new Robo.js project, automatically configuring it for TypeScript development. It simplifies the setup process, allowing developers to start writing TypeScript code immediately. ```bash my-awesome-robo --ts ``` -------------------------------- ### Install @robojs/server Plugin Source: https://github.com/wave-play/robo.js/blob/main/docs/docs/plugins/server.mdx Demonstrates the command to add the @robojs/server plugin to an existing Robo.js project using the Robo CLI. It also shows how to create a new project with the plugin pre-installed. ```bash robo add @robojs/server ``` ```bash -p @robojs/server ``` -------------------------------- ### Plugin Configuration Example Source: https://github.com/wave-play/robo.js/blob/main/packages/@robojs/roadmap/AGENTS.md This example demonstrates how to configure the roadmap plugin, specifically the Jira provider. It shows the structure for specifying the provider type and its associated options, including environment variable usage for sensitive information. ```typescript export default { provider: { type: 'jira', options: { url: process.env.JIRA_URL, email: process.env.JIRA_EMAIL, apiToken: process.env.JIRA_API_TOKEN, jql: '(issuetype = Epic AND (labels NOT IN ("Private") OR labels IS EMPTY)) OR labels IN ("Public")' } } } ```