Reputation: 11
I would like to set up a message to auto-repeat in a channel once a day at the same time. My research has shown me that using cron is the best solution. The problem is I don't know how to set it up within my discord bots framework. It won't be a command, I want it completely autonomous. Do I need to make a new folder for it? Or put it in my main handler file? I can't find any tutorials out there that show how to integrate cron into a Discord.js code.
Any suggestions or tutorials you can link me to would be much appreciated
Upvotes: 1
Views: 8817
Reputation: 113
You could achieve this with node-cron
.
Here is an example: https://www.digitalocean.com/community/tutorials/nodejs-cron-jobs-by-examples
Upvotes: 0