diff --git a/commands/misc/timer.js b/commands/misc/timer.js index 59e03f7..c4764f1 100644 --- a/commands/misc/timer.js +++ b/commands/misc/timer.js @@ -5,7 +5,10 @@ module.exports = { execute({message, args}) { if(args.length < 2) return message.channel.send("Please specify a time in minutes, and a message to send after the timer has finished"); - let time = args[0] * 60000; + let time = parseInt(args[0]); + if(isNaN(time)) + return message.channel.send("Specify a time in number of minutes"); + time = time * 60000; let sendText = args.slice(1).join(" "); setTimeout(function(){ message.channel.send(`<@${message.author.id}>, ${sendText}`);