A crappy bot that handles only one match at a time and not persistent
Things to upgrade:
There can be only one match per bot (will be refactored to one match per channel, or even per host)Now supports one party per channel- Handles only 6 players in a match
- Doesn't store points when bot is restarted
Since npm package number can only be parsed when running npm script, use this command:
pm2 start npm --name "rlmafiabot" -- start
docker-compose up --build --detach
docker build -t rl-mafia-bot .
docker run --detach --env-file ./.env --name rlmafiabot-container rl-mafia-bot
Note: Docker doesn't ignore quotes (both '
and "
) on .env
file
Issue SIGTERM
to whatever runs the bot. In Docker, this is equivalent to docker stop rlmafiabot-container
.
A game can be created from a party that consists of 6 players. Once a game starts, these players will be split into two teams, and only 1 player will be assigned the mafia role.
Scenarios:
- If you are a mafia and your team loses, you will gain 3 points.
- If you are a non-mafia, you will gain 1 point if you win.
- If you vote a mafia (as a non-mafia), you will gain 1 point. Mafia will lose 1 point for each vote.
- You can't vote for yourself.