Hi, I'm looking to make a command that'll schedule a message to be sent by the bot sometimes in the future. Was wondering if there's something to do such thing.
My first thought was to store the message in the database along with the send_date (year, month, day, hour, minute) and have a function that runs each minute and checks if there's any message to be sent in that minute.
I could go even further to optimise it and have it go every 24h and check if there's any message to be sent in the current day, if yes then add it to a queue and every minute I'd just check that queue.
Another alternative, but this one might be a bit over my programming skills, would be to create some "Task Factory", to which I can pass a date and time and it'll create a task to be launched at the exact date I'm saying; am not entirely sure how I'd make it and if it's worth the trouble.
Has anyone implemented something similar and what was your solution idea to the problem?