After someone Donates, reset their Donator Roll and notify them in 30 Days

commands
#1

Was wondering if there was there was an easy way to set the Donator role to reset every 30 days after a donation of a specified amount per user?

Kind of looking to do what Twitch does with their Subscriber role, but just for Donators instead.

If anyone can point me in the right direction that would be most helpful.

Thanks!

:smiley:

#2

This would require creating a new table in the database that should have a key of the username and a value of the timestamp (in Epoch format). Then, have the bot start a new timer that runs every 24 hours, and when the bot boots up (you could get more fancy and try to make it only run when midnight hits, but that is a bit more additional logic) scan that table and if the current timestamp - stored timestamp > 30 days (or 2592000 seconds), demote the person to their previous level, I suppose you could always return them to Regular rather than Viewer to make it easier as well, and remove the entry from the database table.

There are potentially other ways to get this to work, this is just off the top of my head.