SpinShare Referee Bot refbot.ellite.dev/overlay

update readme

+39 -18
+39 -18
README.md
··· 1 - # SpinShare Speen Open Referee Bot 1 + # SpinShare Refbot 2 + 2 3 A Discord bot to help referees manage matches more easily! 3 4 4 5 ## Setup 5 6 6 7 ### Prerequisites 8 + 7 9 - Node.js v24+ 8 10 - A Discord bot application with a token 9 11 - A MongoDB instance 10 12 11 13 ### Installation 14 + 12 15 1. Clone the repository 13 16 2. Run `npm i` in the root directory 14 17 3. Create a `.env` file in the root directory: 18 + 15 19 ```env 16 20 DISCORD_TOKEN=tokenhere 21 + TEST_TOKEN=testbottokenhere 17 22 CLIENT_ID=discordbotapplicationidhere 18 - GUILD_ID=serveridhere 23 + TEST_ID=testdiscordbotapplicationidhere 24 + GUILD_IDS=serveridhere,andhere,maybemore 19 25 MONGODB_URI=mongodb://USERNAME:PASSWORD@URL:PORT 26 + MONGODB_TEST_URI=mongodb://USERNAME:PASSWORD@URL:PORT 20 27 WS_PORT=websocketporthere 28 + HTTP_PORT=webserverporthere 21 29 ``` 22 30 23 31 ### Running 32 + 24 33 - `npm run deploy` - registers slash commands with Discord (run this whenever you add or change commands) 25 - - `npm run dev` - runs the bot in development mode with auto-restart on file changes 34 + - `npm run deploy-test` - same as above but for testbot 35 + - `npm run dev` - runs the TEST bot with auto-restart on file changes 26 36 - `npm start` - runs the bot in production mode 27 37 28 - ## Features 29 - - **/start** - starts a match, handling: 30 - - player check-in via dropdown 31 - - referee approval 32 - - random ban order selection 33 - - alternating ban phase until one map remains 34 - - **/restart** - restarts a previously completed match with the same map pool 35 - - **/result** - submits the result of the current chart 36 - - **/clean** - cleans up stuck or abandoned matches 37 - - **/refresh** - fetches the map pool from a Google Sheets URL and caches SpinShare chart data 38 - - **/generate** - generates all match pools for the tournament (maybe integrate this into `/refresh` instead?) 39 - - **/event** - creates, switches, and lists events 40 - - **/ping** - replies with "Pong!" and how long the command took to execute. 41 - - **/hostname** - replies with hostname of current environment 38 + ## Commands 39 + 40 + extras: 41 + 42 + - `/commands` - Lists all available commands. 43 + - `/debugpools` - Debug the generated pools structure 44 + - `/hostname` - Replies current hostname 45 + - `/ping` - Replies with 'Pong!' 46 + 47 + utility: 48 + 49 + - `/clean` - Clean up stuck or abandoned matches. 50 + - `/config set-referee-role` - Set the role that is allowed to run referee commands. 51 + - `/event create` - Create a new event and set it as active. 52 + - `/event switch` - Switch to an existing event. 53 + - `/event list` - List all events. 54 + - `/event current` - Show the currently active event. 55 + - `/forceclean` - Force clean a stuck match from memory 56 + - `/generate` - Generate all match pools for the tournament. 57 + - `/refresh` - Refresh the map pool from a Google Sheets URL. 58 + - `/restart` - Restart a previously completed match. 59 + - `/result` - Submit the result of the current chart. 60 + - `/start` - Start the next match! 42 61 43 62 ## TO-DO 63 + 44 64 In no order: 65 + 45 66 - [x] Handle pick/ban cycle 46 67 - [x] Mappool generation/management 47 68 - [x] Ready checks ··· 57 78 - [ ] Simulate rolls because it's silly and fun! Should be interactive for the players 58 79 - [ ] Add a way to revert the last step (for example if someone reported incorrect scores) 59 80 - [ ] Make it more obvious who is "score1" and who is "score2" 60 - - [ ] Player stat tracking? (Use discord account ID?) 81 + - [ ] Player stat tracking? (Use discord account ID?)