MitchellAW/FlandersBOT

Migrate any remaining json to db

MitchellAW opened this issue · 2 comments

There are still a few remaining uses of json by the bot that can easily be replaced with some new tables in the existing PostgreSQL database.

These json elements include:

  • Custom guild prefixes
  • Command statistics
  • Trivia questions/answers

It would likely be worth keeping the json file with trivia questions/answers due to its simplistic format. Alternatively, a script could be added to read from the json and insert the records into a DB for use by the bot. This would keep an easily readable open source record of all the trivia questions/answers, but eliminate the bots dependency on reading a json file for trivia matches.

Migrated custom guild prefixes from using json file to DB: d42deda

  • Custom guild prefixes

Migrated command statistics from using json to DB: 1470d0b

  • Command statistics
    Will write a script to add current statistics in json to DB using default prefix, null guild id, and minimum timestamp.
    Note: Similar will be done for prefixes.