FlorianSW/server-donation-tool

Provide discord role perk with expiring roles

FlorianSW opened this issue · 1 comments

Out of now, the donation tool provides a discord role perk, which will assign one or more discord roles to the donator. These roles will not be removed automatically, making them permanent implicitly.

This issue aims on implementing discord roles, which are non-permanent (you could say "temporary"), just the same way as priority queue slots work as well. The idea is:

  • Add an additional, optional configuration parameter to the discord role perk, which defines the days the donator should have this role
  • The configuration is per perk, not per role (the discord role perk takes a list of roles right now). If a server owner wants permanent and temporary role in one package, they can define two different perks of type discord role for that
  • Discord does not have an expiry feature on roles, the expiration needs to be handled by the donation tool.
  • The expiration is ok to be on a "strongly until, eventually removed" concept meaning: the role will not be removed before the configured time, but will eventually be removed after the time passed

Technical considerations:
Where to save the information what roles where given and when they should be remove.

  • One separate sqlite database? A separate database technology? A text file even?
  • What information should be persisted?
  • How to setup a scheduler which runs efficiently to remove the roles
  • How often should the roles be removed (daily, hourly?)

Possibly a role which gets removed after a player's priority queue has expired. As a way for server staff and players to know via discord when expiration occurs. Maybe even sends them a discord DM via the bot to let the player know/see if they want to donate again for priority.