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.
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.