further-reading / Dicecord-Chatbot

Python based diceroller bot for discord.
GNU General Public License v3.0
9 stars 2 forks source link

[WIP] [untested] Add JSON saving + custom prefix command #10

Closed further-reading closed 4 years ago

further-reading commented 5 years ago

Added draft code for setting a custom prefix. Will be set at the channel level, checks if a prefix has been set and if not it will use @mention.

Also changed code to save details as json rather than xml. This makes it easier to add/remove customisation without having to rewrite the save/read code. However, had to create a subclass of json.JSONEncoder to allow the saving of datetimes and also had to edit the save code to convert strings back to datetimes when checking if entry should be removed.

further-reading commented 4 years ago

With the refactor to db storage this will require a lot of changes, will abandon and come back later.