Write to timers.json after adding new timer

This commit is contained in:
SileNce5k 2022-06-09 19:06:48 +02:00
parent 879c27b799
commit 8a69212515
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -1,4 +1,5 @@
const parseTime = require('../../util/timer/parseTime');
const fs = require('fs');
module.exports = {
name: "timer",
description: "Set a timer for a time in minutes.",
@ -20,6 +21,7 @@ module.exports = {
"customMessage": `${customMessage}`
}
client.timers.push(newTimer);
fs.writeFileSync('../../data/timers.json', JSON.stringify(client.timers, null, 4))
message.channel.send(`I will remind you <t:${reminderTime}:R>`);
}
};