I have a bot with a command that allows the user to input a message separated with a dash and then a specified time, this is then passed to the bot and the bot reminds the user with the message after the specified amount of time has passed.
function reminder(msg) {
const message = msg.content.replace(this.prefix+this.name+" ","");
const params = message.split("-");
setTimeout(() => {
msg.channel.sendMessage(params[0]);
}, (parseInt(params[1])*1000));
}
I intend to run this bot on Heroku, but since I'm just a teenager and this is a hobby for me I have to use the free dyno hours that Heroku gives me every month. If someone uses this function of the bot will the timing mechanism of setTimeout keep my dynos enabled and use the free dyno hours?
Edit: If you believe there is a better free alternative to Heroku that any of you know of that would be great :)