Fix thing when first arg is NaN

This commit is contained in:
SileNce5k 2022-05-15 01:27:40 +02:00
parent f3e3fd9dbc
commit 5f4a0056d7
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -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}`);