mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Rename the incorrect boolean flag
This commit is contained in:
parent
fd4948917b
commit
d2100aafb9
@ -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
|
||||||
|
@ -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
2
src/interfaces.d.ts
vendored
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user