Add an identifier to each timer

Closes #24
This commit is contained in:
SileNce5k 2023-04-16 18:41:29 +02:00
parent 501a78b7c9
commit 8df6244363
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
2 changed files with 10 additions and 2 deletions

View file

@ -23,7 +23,12 @@ client.settings = new Discord.Collection();
client.commands = new Discord.Collection();
client.serverPrefixes = new Discord.Collection();
client.netmodules = new Discord.Collection();
client.timers = require('./data/timers.json')
client.timers = require('./data/timers.json');
if(!fs.existsSync("./data/lastTimerID.txt")){
fs.writeFileSync('./data/lastTimerID.txt', "0");
}
client.lastTimerID = parseInt(fs.readFileSync('./data/lastTimerID.txt', 'utf8'));
client.settings.set("presenceType", presenceType);
client.settings.set("presenceText", presenceText);