All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fixed bug where calling a command that invoked the
play_sound
function caused anAttributeError
to be thrown. - Fixed bug where if an admin executed the
!stop
command while the game was during the transfer/betting phase, the bot would not reset to a clean state. - Fixed bug where bets were not being formatted as integers when displaying bet results.
- Added challenge mode. Players can now challenge each other to 1v1 duels.
- Bets now include a price. By default this is 2.0 for classic games and can vary between 1.01 and 101 for challenges.
- Replaced database protocol with ABC.
- Simplified database API.
- Replaced all uses of TypedDict with Dataclass for consistency.
- Game state is now stored in the GameStore.
- Added global exception handler to log uncaught exceptions.
- Cleaned up Dockerfile, stopped copying in extraneous files.
- Command typo's will now be purged!
- Fixed bug in
play_sound
function which would, on occasion, sit forkingffmpeg
forever more. - Fixed bug where game would hang if more than 10 players signed up and players would have to be benched.
- Betting window shortened to 1 minute.
- Player transfer window shortened to 1 minute.
- Fixed deregister command, was attempting to obtain Player record from database via name instead of id.
- Reverted back to players being moved channels after Betting phase.
- Betting window shortened from 3 to 2 minutes.
- The
!who
command no longer attempts to print current signups if there are none. - Players will be moved channels after the Transfer phase instead of after the Betting phase.
- Added a
!recalibrate
command to allow admins to change a player's MMR on the fly.
- Fixed bug in
!signup
command where the first call would not send a message to be displayed in Discord.
- Fixed bug in on_presence_update callback not removing a player from signups.
- Fixed bug in lobby cleanup routine.
- Added a cleanup routine to the lobby that runs every hour to check for players who have been signed up too long.
- Fixed bug where audio played at end of game would terminate prematurely.
- Bot will now disconnect from voice channel when a game has ended.
- Bet phase has been reduced from 5 mins to 3 mins.
- Changed the order in which events occur during the start of a game. Players are kept in the same voice channel until after the betting phase is over.
- Added missing pynacl dependency
- Bot now plays sounds when some commands are called.
- Now logging discord.py output to separate log file.
- Added ffmpeg requirement in Dockerfile in order to play mp3 files.
- When shuffling, now picks from the top 20 team combinations based on mmr instead of 5.
- Can now use the !bet command and specify amount as either first or second argument.
- Use discord ID for identifying users instead of display name.
- Bumped version for aiohttp and dpytest.
- Switched to using pyproject.toml
- Improved logging by using structlog.
- Added upper limit to MMR submitted when registering for IHL.
- Added !season command to show info on current IHL season.
- Added IHL section to config for tracking game count.
- Fixed bug where all rbucks were deducted on a bet loss.
- Fixed bug where betting on both sides resulted in too many rbucks being deducted.
- Fixed bug that happpened when attempting to add a new player to the database.
- Added callback that cleans up misspelt commands from a text channel.
- Simplified Database API.
- Added a new set of dpytest based tests for testing commands.
- discordpy upgraded to v2.0.
- Fixed a bug in ready check falsely reporting all players were ready.
- Fixed a bug in commend/report where the player being commended/reported and the player issuing the command were in the wrong order.
- Fixed a bug where calling !bet could have resulted in the bet not being registered.
- Side validation now working correctly.
- Log message for the combined MMR of each team.
- Should now send a message to Discord channel when a player attempts to report themselves.
- Stopped players being able to report/commend themselves.
- Removed call to Channels.set_teams function that no longer exists.
- Fixed bug where players were not moved Discord channels before and after game.
- Added a commend/report system and an associated behaviour score for each player. Commend players with !commend {player_name} and report players with !report {player_name} {reason}.
- Refactored how we manage game state, this should make cleanup way easier and we now have less to keep track of.
- Refactored various Cogs including Core and Lobby (previously PreGame).
- Removed a load of awful tests, more to come at some point, maybe...
- Removed !reset command, just use !stop if you wish to abort the game.
- Fixed some member variables not being initialized on instantiating class.
- Tidied up type hints.
- Fixed broken tests.
- Now remove old cogs and replace with new cogs when we reset state.
- Fixed bug where shuffling could result in same teams.
- Fixed bug in setting streaks in TinyDB wrapper.
- Now using TinyDB to store data instead of DynamoDB.
- Removed all dependencies on AWS DynamoDB.
- Fixed bug where Player transfer and Betting windows remained open after a !stop command had been issued.
- Fixed bug where scoreboard if was < 2000 chars, we returned a tuple of characters instead of tuple of strings.
- Functionality to protect RBEEZAY from encountering complete melts on his team.
- Only players that signed up to play can shuffle.
- Added a !shuffle command which will shuffle the teams at the cost of 500 RBUCKS.
- Players who are about to participate in a game can now bet.
- Increased betting window from 2 minutes to 5 minutes.
- Winners of bets should now receive the expected number of RBUCKS.
- Added RBUCKS where players can bet on the outcome of an IHL game.
- No longer able to accidentally issue multiple calls to !start/!stop/!result.
- Simplified code used to balance teams, now always balances using adjusted MMR.
- Users can only signup/signout once every 30s in order to prevent spamming OneHead post-game.
- Users cannot signup/signout while a game is in progress.
- Members signed up to play a game are automatically signed out if they move/are moved to the AFK channel.
- DynamoDB field names can't contain spaces, added '_' into streak fields.
- Added a loss streak field that keeps track of the current loss streak.
- Renamed 'streak' field to 'win streak'.
- Scoreboard now split over multiple messages if it exceeds the max message length enforced by Discord.
- Added a streak field to the scoreboard that keeps track of the current win streak.
- A w/l results in a +/- 50 rating score (previously this was 25).
- The register command only accepts an MMR greater or equal to 1000.
- Python 3 cosmetic changes: f-strings, type hinting etc.
- Tidied up Dockerfile.
- Updated requirements.txt, removed mock dependency and bumped Python version requirement.
- Added !mh command to provide other players with inspirational mental health quotes.
- Added !mmr command to show the MMR that is used internally for balancing teams.
- !summon command now mentions by role instead of by user to comply with Discord 1.5 changes and the addition of 'intents'.
- !signup command output tidied up.
- Fixed bug where stale reference to OneHeadPreGame object was present in the OneHeadBalance object. This was causing players who were not signed up to be present in the lineups produced when a game was started.
- Tidying up of imports and file names.
- Fixed bug with multiple instances of OneHead objects existing, all objects are now cogs and referenced through the global commands.Bot object.
- Added config.json and config_example.json to enable the user to configure their bot.
- Updated README.md with information on requirements, features and config.json
- Removed .env file and python-dotenv dependency.
- Added /src directory and moved onehead_*.py file there.
- Added supporting docstrings/comments throughout.
- Updated README.MD to reflect changes to docker build command.
- Refactored code in OneHeadBalance.
- Moved OneHeadChannels into separate file for consistency.
- Removed need for OAUTH key during build process.
- Removed code duplication in OneHeadCore/OneHeadChannels.
- Removed need to explicitly reference OneHead version number when calling pip install inside Dockerfile.
- Switched to using a CHANGELOG.md file with a full changelog rather than only showing the most recent change(s).
- The !version command will now provide a link to CHANGELOG.md
- All user commands now require IHL discord role.
- Fixed the 'deregister' command, can now remove a player from the IHL database by typing !deregister <name>.
-
Balancing teams now factors in both IHL rating and MMR. This is done by adding the difference between your IHL rating and baseline rating (1500) to your MMR.
e.g. IHL Rating = 1900 and MMR = 5000. Adjusted rating = 5000 + 400 == 5400.
- If there are more than 10 signups, players will be randomly selected to be placed on the bench. This will mean that they will not be able to play.
- Fixed bug when performing check to see if IHL Discord Channels already exist. This stopped players from being moved channel and also resulted in duplicate channels.
- IHL Channels are no longer deleted upon stopping a game.
- Patch note summary now available when using the !version command.
- Picks and Nominations during a CM game are now case insensitive.
- Time to pick during a CM game has been increased from 20s to 30s.
- Added Captain's Mode. Can be initiated by typing '!start cm'. Captains are nominated using the '!nominate' command and picks are made by the nominated captains using the '!pick' command.
- Added version.py for storing version information.
- Added version command which displays the current version of OneHead.
- Added a remove command which allows an IHL Admin to remove a player from the signup pool.
- Signups now reset after a game has finished.