DaRealTurtyWurty / SuperTurtyBot

A multi-purpose discord bot.
GNU Affero General Public License v3.0
6 stars 10 forks source link

Make lastStartTime.txt location configurable #211

Closed DaRealTurtyWurty closed 4 months ago

DaRealTurtyWurty commented 9 months ago

Currently when fetching the changelogs, the location that the bot uses to store the last starting time is hardcoded, and therefore it does not really work inside a docker container.

There's 2 solutions to this:

  1. Make the location configurable through the .env file
  2. Store the lastStartTime inside the database, meaning that it can easily be accessed without having any worry of the file being deleted or lost.

The latter option would be much more preferable, and would require simply making a new database collection for just a "botinfo" or something.

The current location setup can be found here: https://github.com/DaRealTurtyWurty/SuperTurtyBot/blob/main/src/main/java/dev/darealturtywurty/superturtybot/modules/ChangelogFetcher.java#L29

DaRealTurtyWurty commented 4 months ago

Fixed in https://github.com/DaRealTurtyWurty/SuperTurtyBot/commit/65439215ba44e6d326bccecfd818defb000d94f0