From d2100aafb9de73f8dc801451ed4bd11fe7b55923 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:12:26 +1100 Subject: [PATCH] Rename the incorrect boolean flag --- src/config.json | 4 ++-- src/index.ts | 6 +++--- src/interfaces.d.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/config.json b/src/config.json index 10750d6..d52e346 100644 --- a/src/config.json +++ b/src/config.json @@ -14,11 +14,11 @@ "468835415093411861" ], "botSwitches": { - "dailyMsgsBackup": true, "registerCommands": false, "commands": true, "logs": true, - "mpSys": true, + "mpSys": false, + "dailyMsgs": true, "buttonRoles": true, "automod": true, "autores": true diff --git a/src/index.ts b/src/index.ts index 9384f93..f738915 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,7 +63,7 @@ setInterval(async()=>{ const formattedDate = Math.floor((now - client.config.LRSstart)/1000/60/60/24); const dailyMsgs = await client.dailyMsgs.fetchDays(); - if (client.config.botSwitches.dailyMsgsBackup && !dailyMsgs.some(x=>x[0] === formattedDate)) { + if (client.config.botSwitches.dailyMsgs && !dailyMsgs.some(x=>x[0] === formattedDate)) { if (!dailyMsgs.find(x=>x.dataValues.day === formattedDate)) { let total = (await client.userLevels.fetchEveryone()).reduce((a,b)=>a + b.messages, 0); // Sum of all users const yesterday = dailyMsgs.find(x=>x.day === formattedDate - 1) @@ -90,11 +90,11 @@ setInterval(async()=>{ } }, 5000) -if (client.config.botSwitches.dailyMsgsBackup) { +// Cronjob tasks +if (client.config.botSwitches.dailyMsgs) { client.userLevels.initSelfdestruct(); client.userLevels.dataSweeper(); } -// Cronjob tasks // Raw gateway event receivers export let rawSwitches = { diff --git a/src/interfaces.d.ts b/src/interfaces.d.ts index 05f7440..55d36ff 100644 --- a/src/interfaces.d.ts +++ b/src/interfaces.d.ts @@ -68,11 +68,11 @@ export interface Config { LRSstart: number, whitelistedServers: string[], botSwitches: { - dailyMsgsBackup: boolean, registerCommands: boolean, commands: boolean, logs: boolean, mpSys: boolean, + dailyMsgs: boolean, buttonRoles: boolean, automod: boolean, autores: boolean