A Discord bot for coordinating speedrun races.
- categories
- automatic text and audio countdown
- race timing
- timing offset
- elo ranking
- category leaderboards
- buttons and commands for ease of use
.prefixes : both . and ! are acceptable prefixes
.toggle /pager: Grants or removes the RacePager role.
.seed: Generates a random seed link for the randomizer.
.leaderboard: Shows the current rankings for a category ".leaderboard gsb"
.rank: Shows the player's rank for a category ".rank maria"
.stream: Sets the Twitch username for the player and saves it. ".stream Alucard"
.new / .startrace Starts a new race. Optional category and offset ".new rab xb"
.close /end/exit Ends the current race with no result.
.category Changes the category for the current race.
.join: Joins the current race or starts a new one ".join aab psx"
.leave: Leaves the current race.
.ready: Sets player status to ready to start.
.unready: Sets player status to not ready to start.
.done / .time: Finishes the race for the player.
.forfeit: Forfeits the race for the player.
.reset: Resets the race status and joined players.
.rematch: Starts new race with the same players.
.offset: Sets the starting time offset ".offset 4/.offset psx/.offset xb"
➕: Join ✅: Ready 🏁: Done ❌ : Forfeit ↩: Rematch
gsb, rando, randomizer, any%, alucard, aab, glitchless, ps4, requiem, abrsr, richter, rich, rab, maria, mab
- Node.js 12.10.0 +
- FFmpeg
- npm install
- create a .env file for a discord authentication token
- create a new Discord application and bot
- configure from config.json and eloConfig.json
- add countdown audio file to root folder or remove audio playback from startRace.js
- ELO uses a json storage file. Good enough for small servers, but I would replace it with MongoDB or another db server for a large population. Data handling is abstracted in ../data/data.js for easy swapping.
- Error handling
- Spam prevention
- Fixed forfeit draw elo calculation.
- Other small bugfixes and refactoring.
- Added a command to toggle a race pager role for dedicated race pinging.
- Refactoring.
- Added an automatic kadgar link. Unfortunately Discord does not allow bots to see people's linked social media accounts, even though they put them there publically, so if a user's Twitch has a different username it has to be set with the ".stream" command.
- Fixed scores being calculated before final player array sort.
- Added rank command to check player standings without showing the whole leaderboard.
- Refactoring.
- Added ELO ranking system.
- Regex for command matching.
- Extended command functionality.
- Numerous small fixes.
- Added emoji reaction-based buttons as an alternate method of triggering the commands
- Changed output from individual messages to a continuously updated status message
- Added rematch command
- Added audio countdown
- More output adjustments
- More output adjustments
- Kinda forgot that let exists
- Output adjustments
- Added default offset
- Added automatic race timeout and reset
- Added leave command
- Commands need to be in required channel
- Release