diff --git a/Discord-activities-with-Raylib.md b/Discord-activities-with-Raylib.md index 45f1aac..5ebc1af 100644 --- a/Discord-activities-with-Raylib.md +++ b/Discord-activities-with-Raylib.md @@ -1,34 +1,40 @@ -**NOTE: this guide assumes you already have setup and built a Raylib project and assumes you have these files from emscriptem (possibly different file stems):** (NOTE: [guide here](https://github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5))) +**NOTE: This guide assumes you already have setup and built a [raylib WebAssembly project](https://github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5)) and assumes you have these gnerated the followinf files with emscriptem:** (NOTE: [guide here]() - `game.js` - `game.wasm` +- `index.html` +- `game.data` (Optional) -Official documentation can be found [here](https://discord.com/developers/docs/activities/building-an-activity). +Official Discord documentation on the process can be found [here](https://discord.com/developers/docs/activities/building-an-activity). ## Discord setup -First create a discord application on [Discord](https://discord.com/developers/applications) and get it's Application ID and Bot token. These will be important later so put them somewhere safe. + +First create a discord application on [Discord](https://discord.com/developers/applications) and get it's `Application ID` and `Bot token`. These will be important later so put them somewhere safe. ## Template setup + You next steps are to download the template like so: + ```sh git clone git@github.com:discord/getting-started-activity.git raylib-activities cd raylib-activities - cp example.env .env ``` -You will notice some fields in your `.env` file that has been newly created. You can fill these in with your Application ID for `CLIENT_ID` and your bot token for `CLIENT_SECRET`. +You will notice some fields in your `.env` file that has been newly created. You can fill these in with your `Application ID` for `CLIENT_ID` and your bot token for `CLIENT_SECRET`. You can now enter the `client` directory and set it up like so: + ```sh cd client npm install npm run dev ``` -(Note: replace `npm` here with your preferred tool if you have manually installed an alternative) +(NOTE: Replace `npm` here with your preferred tool if you have manually installed an alternative) You should now see a basic "Hello, World!" app when you go to [the server](http://localhost:5173) in your browser. Now stop your dev command. In your `raylib-activities/client/index.html` replace with this content: + ```html @@ -37,7 +43,7 @@ In your `raylib-activities/client/index.html` replace with this content: -