geas-bot/CHANGELOG.md

3.0 KiB

Changelog

Minor Updates in Version 3.0.1

  • Re-builds the Docker image to use a python:slim base instead of python:buster, reducing the footprint of the image to a quarter of its previous size.

Major Changes in Version 3

  • Discards the database engine in favour of data storage in .yml files
    The database engine was overkill. It only slowed down the Bot's performance, made it more fragile, and caused unnecessary complexity while not really providing any necessary utility. This also makes server migration much easier. I went with .yml files over .json because I preferred the readability of the former, and to align it with the Docker-Compose files elsewhere in the directory. I cannot believe how much I got into the debate between these two formats. Seriously, the database was overkill and such a bad idea. It was fun to learn but was such a bad idea.
  • Implements client-side /commands as the core method of interaction
    This takes advantage of a new Discord feature to programme /commands into the console via Bot integration rather than natively at the bot. This offers more robust command handling, with client-side data validation, option entries, input menus, etc. This does have the drawback of requiring a more complex API interaction in order for the bot to function, but it should improve the bot's functionality overall.
  • Uses Discord Buttons and Select Menus to replace Reaction Role features
    In keeping with adopting more robust Discord features to deprecate old ones, this new version of the Bot tries to make use of more powerful Discord features instead of contorting Reaction Roles and other previous features into the shape of something they were not built for. While it is unclear what the direction of such developments in Discord will be going forward, and it is unclear how future API changes will affect this, one way or another this is using new Discord features in the way they are meant to be used rather than excessive hacking.
  • Provides a level of abstraction in many of its recognition of the various roles and channels referenced in its functioning.
    The bot no longer has specific channels (like help or committee notification channels) or roles (like administrators or different categories of membership) hard-coded into it for it to interact with them. This makes the code a lot more complex to debug and maintain, especially when handling defaults or fail-safes for when the relevant roles or channels are deleted, but has some added flexibility and makes the bot a lot less dependent a precise server setup, thus making it a lot more brittle in the long run.
  • Refactors the old code for more clarity in the bot's code
    Adds some descriptions and explanatory text to the commands themselves so they can be accessed and displayed via the bot help command, making the bot a lot more usable. Also presents the code in a more readable format, with clearer indentation and parameter naming for core functions. The code has a lot more in-line comments explaining how it works so that it can be maintained by other people.