For Developers
Installation
- Run
npm install. - Copy the
.env.examplefile to.env. - Edit
.envto configure the bot and its authentication. - Run
npx prisma migrate deployto create the database. - Run
npx prisma generateto update the Prisma Client API. - Copy the
src/game-data-examplesdirectory tosrc/game-data. - Within
src/game-data, find the game you want the bot to run.- Edit
GAME.jsonto defineprivategame data (see below). - Do not distribute
privategame data from yourGAME.jsonfiles.
- Edit
- For development, run
npm run startfor auto-restart on file changes. - For production, run
npm run buildandnpm run start:production.
private game data
@todo
Design decisions
Why messages instead of slash commands?
- PRO: Message commands can do anything with enough effort.
- CON: Message commands require custom help, validation, etc.
- PRO: Slash commands allow autocompletion, hinting, choices, etc.
- CON: Slash commands are limited to 100 per bot.
- There are more than 100 Button Shy games.
- Let’s grossly assume we’ll implement them all ;)
- We can’t use
/{GAMENAME}as we’d run out of space.
- PRO: We could make slash commands where the game is an option.
/generate {GAMENAME} {PLAYER..} {OPTION..}/start {GAMENAME} {PLAYER..} {OPTION..}/turn {GAMENAME} {GAMEID} {OPTION..}- CON: This could get ugly for paragraph long strings (in an RPG).
- If we want to log and “replay” games, the bot needs everything.
- Logging helps asynchronous play across days without backscrolling.
/turn {GAMENAME} {GAMEID} I am a long paragraph for an RPG turn.
- DECISION: Re-evaluate slash commands after a few games are implemented.
- CONSIDER: Why not implement both messages and slash commands?
Why messages instead of subcommands?
@todo