For Developers
Installation
- Run
npm install
. - Copy the
.env.example
file to.env
. - Edit
.env
to configure the bot and its authentication. - Run
npx prisma migrate deploy
to create the database. - Run
npx prisma generate
to update the Prisma Client API. - Copy the
src/game-data-examples
directory tosrc/game-data
. - Within
src/game-data
, find the game you want the bot to run.- Edit
GAME.json
to defineprivate
game data (see below). - Do not distribute
private
game data from yourGAME.json
files.
- Edit
- For development, run
npm run start
for auto-restart on file changes. - For production, run
npm run build
andnpm 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