Write to timers.json after adding new timer
This commit is contained in:
parent
879c27b799
commit
8a69212515
1 changed files with 2 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
const parseTime = require('../../util/timer/parseTime');
|
const parseTime = require('../../util/timer/parseTime');
|
||||||
|
const fs = require('fs');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "timer",
|
name: "timer",
|
||||||
description: "Set a timer for a time in minutes.",
|
description: "Set a timer for a time in minutes.",
|
||||||
|
@ -20,6 +21,7 @@ module.exports = {
|
||||||
"customMessage": `${customMessage}`
|
"customMessage": `${customMessage}`
|
||||||
}
|
}
|
||||||
client.timers.push(newTimer);
|
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>`);
|
message.channel.send(`I will remind you <t:${reminderTime}:R>`);
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
Add table
Reference in a new issue