A turn-based survival Discord bot with AI-powered narration.
Hungerfall is not a passive simulator. Players actively receive turn choices via DMs each round (Attack, Defend, Hide, Search, and more), while a deterministic game engine resolves the combat, and an AI-compatible model narrates the gritty outcome.
Create a .env file in the root directory:
# Discord Configuration
DISCORD_TOKEN=your_discord_bot_token
DISCORD_CLIENT_ID=your_discord_application_id
# AI Narrator (Optional - Falls back to templates if not provided)
AI_API_KEY=your_openai_compatible_api_key
AI_BASE_URL=https://api.openai.com/v1
AI_MODEL=gpt-4o-mini
# Database File Path (Default: ./data/matches.json)
DATA_PATH=./data/matches.json
# Log Level (debug, info, warn, error)
LOG_LEVEL=info- Run the
/gameslash command in a channel.- Optional options:
language(en, tr, de) andrequired_role(to restrict entries).
- Optional options:
- Players click Join to enter the lobby.
- The lobby creator (who ran
/game) clicks Start Game to begin. - Active players receive turn DMs from the bot. Use actions, items, and survive until one remains!
npm installRuns the bot locally with auto-reload:
npm run devCompiles the TypeScript source files and starts the application:
npm run build
npm start