LorenzHetterich / CTFHelperJava

2 stars 1 forks source link

Keep state on restart #1

Closed LorenzHetterich closed 5 months ago

LorenzHetterich commented 9 months ago

Affected Components

Discord Bot

Current State

Currently, when the bot crashes or is restarted, it looses all state. This includes knowledge about currently running CTFs, Cookies, ... But worst: Mapping between channels and CTFd challenges. Thus, restarting the bot during CTF is not an option.

Suggestion

Add command that saves all current state information to a JSON file. Also add command that will load this state. In the best case, this should be error resilient and work, even if some channels are deleted / moved. Also, the saving should automatically periodically every few minutes or so.

LorenzHetterich commented 5 months ago

"fixed" for now. The implementation is super ugly as I rushed it. (But it works)