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:
parent
fd4948917b
commit
d2100aafb9
@ -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
|
||||
|
@ -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 = {
|
||||
|
2
src/interfaces.d.ts
vendored
2
src/interfaces.d.ts
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user