cyber elysium, disco punk
To run the Discord bot, follow these steps to create and configure your own bot in Discord:
- Go to the Discord Developer Portal
- Click "New Application" and give it a name
- Go to the "Bot" section and click "Add Bot"
- Scroll to privileged gateway intents
- Enable all 3 toggles: Presence, Server Members, Message Content
- Reset token and copy it
- In Developer Portal, go to OAuth2 > URL Generator
- Select "bot" under scopes
- Select needed permissions:
- Send Messages
- Send Messages in Threads
- Read Message History
- Discord admin can use the generated URL to invite the bot to your server
- Confirm by going to server settings > Apps/Integrations > Bots & Apps
Once you have your bot token, add it to a .env file in your project root as:
DISCORD_BOT_TOKEN=your_token_hereYou may want to configure the bot to use different channels for gameplay and debugging. To do so, you need each channel's unique ID:
- In Discord, go to User Settings > Advanced and enable "Developer Mode".
- Right-click on the channel you want to use.
- Click "Copy Channel ID".
- Add them to your
.envfile as:
DISCORD_CHANNEL_ID=your_gameplay_channel_id
DISCORD_DEBUG_CHANNEL_ID=your_debug_channel_idDISCORD_CHANNEL_IDis for the main gameplay channel.DISCORD_DEBUG_CHANNEL_IDis for a dedicated debug/logging channel.
You can now use these variables in your code to specify where the bot should listen, send messages, or log debug output.
Continue with installation and running the bot as described below.
cd backend
npm install
npm run play -- --mario-party-luigicd backend
npm install
npm run playNote: Running both servers from the project root with a single command is not supported at this time. Please use the manual method below.
Backend:
cd backend
npm install
npm startFrontend:
cd frontend
npm install
npm run dev- Visit http://localhost:5173 in your browser to play.
Test backend endpoints directly:
curl -i -X POST http://localhost:3000/api/dialog -H "Content-Type: application/json" -d '{"playerId":"player1","sceneId":"scene_intro"}'cd backend
npm install
npm testOllama lets you run language models locally on your machine.
-
Install Ollama:
Follow the instructions at ollama.com/download for your platform. -
Run Ollama:
Start Ollama by running:ollama serve
or, to run the recommended/tested model for this project (
gemma3:12b):ollama run gemma3:12b
Note: This project has been tested with
gemma3:12band it is the recommended model. -
The backend will connect to Ollama automatically if it’s running.
OpenRouter lets you access a variety of LLMs through a cloud API.
-
Sign up and get your API key:
Go to openrouter.ai and sign up.
After signing in, visit your API Keys page to create a key. -
Set your API key as an environment variable:
In your terminal, run:export OPENROUTER_API_KEY=sk-...yourkey...Or add this line to your
.bashrc,.zshrc, or equivalent shell profile. -
The backend will use OpenRouter if the API key is set.
If neither Ollama nor OpenRouter is configured, the backend will attempt to use Lean Vault.
Most users will not have Lean Vault installed, so it’s recommended to use one of the above options.