richteer / ritbot

A Discord bot for managing a Guild Wars 2 guild
MIT License
0 stars 0 forks source link

Sign-ups should persist over restart #3

Open richteer opened 6 years ago

richteer commented 6 years ago

Because of #2 (which should probably be fixed too), sign-up posts should re-enumerate themselves on bot start.

Idea: write the discord message ID and expiration date to disk, and fetch the messages on start.

richteer commented 6 years ago

This is more of a pain that originally expected. I'm considering two options right now to "solve" this:

  1. Back up the sign-up information via an external online data store -- in less stupid terms: maybe make a web API for this, and have the discord posts either recreate themselves from it, or store the relevant post ID externally.

  2. Rewrite the relevant data classes to be more serializable. Too many of the data bits are discord specific data objects, rather than flat numbers and strings. Might be worth simplifying that so the signups can be more easily written to and recovered from disk