1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 00:10:58 -05:00

Rename the incorrect boolean flag

This commit is contained in:
toast-ts 2024-10-30 19:12:26 +11:00
parent fd4948917b
commit d2100aafb9
3 changed files with 6 additions and 6 deletions

View File

@ -14,11 +14,11 @@
"468835415093411861" "468835415093411861"
], ],
"botSwitches": { "botSwitches": {
"dailyMsgsBackup": true,
"registerCommands": false, "registerCommands": false,
"commands": true, "commands": true,
"logs": true, "logs": true,
"mpSys": true, "mpSys": false,
"dailyMsgs": true,
"buttonRoles": true, "buttonRoles": true,
"automod": true, "automod": true,
"autores": true "autores": true

View File

@ -63,7 +63,7 @@ setInterval(async()=>{
const formattedDate = Math.floor((now - client.config.LRSstart)/1000/60/60/24); const formattedDate = Math.floor((now - client.config.LRSstart)/1000/60/60/24);
const dailyMsgs = await client.dailyMsgs.fetchDays(); 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)) { 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 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) const yesterday = dailyMsgs.find(x=>x.day === formattedDate - 1)
@ -90,11 +90,11 @@ setInterval(async()=>{
} }
}, 5000) }, 5000)
if (client.config.botSwitches.dailyMsgsBackup) { // Cronjob tasks
if (client.config.botSwitches.dailyMsgs) {
client.userLevels.initSelfdestruct(); client.userLevels.initSelfdestruct();
client.userLevels.dataSweeper(); client.userLevels.dataSweeper();
} }
// Cronjob tasks
// Raw gateway event receivers // Raw gateway event receivers
export let rawSwitches = { export let rawSwitches = {

2
src/interfaces.d.ts vendored
View File

@ -68,11 +68,11 @@ export interface Config {
LRSstart: number, LRSstart: number,
whitelistedServers: string[], whitelistedServers: string[],
botSwitches: { botSwitches: {
dailyMsgsBackup: boolean,
registerCommands: boolean, registerCommands: boolean,
commands: boolean, commands: boolean,
logs: boolean, logs: boolean,
mpSys: boolean, mpSys: boolean,
dailyMsgs: boolean,
buttonRoles: boolean, buttonRoles: boolean,
automod: boolean, automod: boolean,
autores: boolean autores: boolean