From 8a69212515a8e68ca8801135c4769f4d4626f11f Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Thu, 9 Jun 2022 19:06:48 +0200 Subject: [PATCH] Write to timers.json after adding new timer --- commands/misc/timer.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/misc/timer.js b/commands/misc/timer.js index bfa406e..4c19ce9 100644 --- a/commands/misc/timer.js +++ b/commands/misc/timer.js @@ -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 `); } }; \ No newline at end of file