1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-12-26 11:45:37 -05:00

Compare commits

...

4 Commits

Author SHA1 Message Date
toast-ts
dba415862f Forgot to disable logs
Canary bot has taken over it already, so is MPModule.
2024-10-30 19:16:55 +11:00
toast-ts
f078129f43 Update Yarn to 4.5.1 2024-10-30 19:16:11 +11:00
toast-ts
d2100aafb9 Rename the incorrect boolean flag 2024-10-30 19:12:26 +11:00
toast-ts
fd4948917b Update dependencies 2024-10-30 19:12:05 +11:00
6 changed files with 31 additions and 40 deletions

View File

@ -1,5 +1,5 @@
FROM node:22.7-alpine3.20
ENV YARN_VERSION="4.5.0"
ENV YARN_VERSION="4.5.1"
ENV TZ="Australia/Sydney"
ENV NODE_COMPILE_CACHE="/Daggerbot/build_cache"
RUN yarn policies set-version $YARN_VERSION

View File

@ -25,7 +25,7 @@
"npm": "NPM isn't supported, please use Yarn instead."
},
"engineStrict": true,
"packageManager": "yarn@4.5.0+sha512.837566d24eec14ec0f5f1411adb544e892b3454255e61fdef8fd05f3429480102806bac7446bc9daff3896b01ae4b62d00096c7e989f1596f2af10b927532f39",
"packageManager": "yarn@4.5.1+sha512.341db9396b6e289fecc30cd7ab3af65060e05ebff4b3b47547b278b9e67b08f485ecd8c79006b405446262142c7a38154445ef7f17c1d5d1de7d90bf9ce7054d",
"dependencies": {
"@napi-rs/canvas": "0.1.59",
"@octokit/rest": "21.0.2",
@ -46,7 +46,7 @@
},
"devDependencies": {
"@types/ms": "0.7.34",
"@types/node": "22.8.1",
"@types/node": "22.8.4",
"@types/node-cron": "3.0.11",
"typescript": "5.5.4"
}

View File

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

View File

@ -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
View File

@ -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

View File

@ -6,11 +6,11 @@ __metadata:
cacheKey: 10
"@babel/runtime@npm:^7.25.6":
version: 7.25.7
resolution: "@babel/runtime@npm:7.25.7"
version: 7.26.0
resolution: "@babel/runtime@npm:7.26.0"
dependencies:
regenerator-runtime: "npm:^0.14.0"
checksum: 10/73411fe0f1bff3a962586cef05b30f49e554b6563767e6d84f7d79d605b2c20e7fc3df291a3aebef69043181a8f893afdab9e6672557a5c2d08b9377d6f678cd
checksum: 10/9f4ea1c1d566c497c052d505587554e782e021e6ccd302c2ad7ae8291c8e16e3f19d4a7726fb64469e057779ea2081c28b7dbefec6d813a22f08a35712c0f699
languageName: node
linkType: hard
@ -511,9 +511,9 @@ __metadata:
linkType: hard
"@types/lodash@npm:^4.17.0":
version: 4.17.10
resolution: "@types/lodash@npm:4.17.10"
checksum: 10/10fe24a93adc6048cb23e4135c1ed1d52cc39033682e6513f4f51b74a9af6d7a24fbea92203c22dc4e01e35f1ab3aa0fd0a2b487e8a4a2bbdf1fc05970094066
version: 4.17.13
resolution: "@types/lodash@npm:4.17.13"
checksum: 10/ddb34e20810c71be2d9445bcc4b64ec25b83976738454de709854b79c7f655b03704b76235445699956d65012987720e0e429a35489de65495cdb5420202d905
languageName: node
linkType: hard
@ -531,21 +531,12 @@ __metadata:
languageName: node
linkType: hard
"@types/node@npm:*":
version: 22.7.5
resolution: "@types/node@npm:22.7.5"
dependencies:
undici-types: "npm:~6.19.2"
checksum: 10/e8ba102f8c1aa7623787d625389be68d64e54fcbb76d41f6c2c64e8cf4c9f4a2370e7ef5e5f1732f3c57529d3d26afdcb2edc0101c5e413a79081449825c57ac
languageName: node
linkType: hard
"@types/node@npm:22.8.1":
version: 22.8.1
resolution: "@types/node@npm:22.8.1"
"@types/node@npm:*, @types/node@npm:22.8.4":
version: 22.8.4
resolution: "@types/node@npm:22.8.4"
dependencies:
undici-types: "npm:~6.19.8"
checksum: 10/ae969e3d956dead1422c35d568ea5d48dd124a38a1a337cbd120fec6e13cc92b45c7308f91f1139fcd2337a67d4704d5614d6a2c444b1fb268f85e9f1d24c713
checksum: 10/ee6b6b66c290a74bb37487f5ec533b7333c25e1b2f45016af4cd870408c4366f6fca75de5b8bb7a6e5836ab0536d2ef1910a89a2f797ae33a80344d0e81de03e
languageName: node
linkType: hard
@ -628,9 +619,9 @@ __metadata:
linkType: hard
"complex.js@npm:^2.1.1":
version: 2.3.0
resolution: "complex.js@npm:2.3.0"
checksum: 10/e11898404570a2a10154cc3d21ddb66ef208d1a9d3aa13e76a7c3e73b9f7e36a42435659b13d34dc1990d7276e1c32beb59274e3870e4d4324365b335500bfff
version: 2.4.0
resolution: "complex.js@npm:2.4.0"
checksum: 10/7377be0136085b5818488894c7e391974f64edb4ddb983216fecb542be24b3b75f232482bc930917722b0b4fef0191e57a224ce7d6a48a5398700142cd55b120
languageName: node
linkType: hard
@ -644,7 +635,7 @@ __metadata:
"@sequelize/postgres": "npm:7.0.0-alpha.43"
"@toast/tokenservice-client": "npm:1.3.1"
"@types/ms": "npm:0.7.34"
"@types/node": "npm:22.8.1"
"@types/node": "npm:22.8.4"
"@types/node-cron": "npm:3.0.11"
ansi-colors: "npm:4.1.3"
dayjs: "npm:1.11.13"
@ -1013,8 +1004,8 @@ __metadata:
linkType: hard
"pg@npm:^8.11.3":
version: 8.13.0
resolution: "pg@npm:8.13.0"
version: 8.13.1
resolution: "pg@npm:8.13.1"
dependencies:
pg-cloudflare: "npm:^1.1.1"
pg-connection-string: "npm:^2.7.0"
@ -1030,7 +1021,7 @@ __metadata:
peerDependenciesMeta:
pg-native:
optional: true
checksum: 10/6defa3254b121317014c6de0ce4c21a9a1ec9b7ef24651164596b813d951d6545542faab964131f11e81c64c5c166b14051f6808e0247af928e1773a9fd7e0af
checksum: 10/542aa49fcb37657cf5f779b4a31fe6eb336e683445ecca38e267eeb0ca85d873ffe51f04794f9f9e184187e9f74bf7895e932a0fa9507132ac0dfc76c7c73451
languageName: node
linkType: hard
@ -1257,9 +1248,9 @@ __metadata:
linkType: hard
"tslib@npm:^2.6.2, tslib@npm:^2.6.3":
version: 2.7.0
resolution: "tslib@npm:2.7.0"
checksum: 10/9a5b47ddac65874fa011c20ff76db69f97cf90c78cff5934799ab8894a5342db2d17b4e7613a087046bc1d133d21547ddff87ac558abeec31ffa929c88b7fce6
version: 2.8.0
resolution: "tslib@npm:2.8.0"
checksum: 10/1bc7c43937477059b4d26f2dbde7e49ef0fb4f38f3014e0603eaea76d6a885742c8b1762af45949145e5e7408a736d20ded949da99dabc8ccba1fc5531d2d927
languageName: node
linkType: hard
@ -1304,7 +1295,7 @@ __metadata:
languageName: node
linkType: hard
"undici-types@npm:~6.19.2, undici-types@npm:~6.19.8":
"undici-types@npm:~6.19.8":
version: 6.19.8
resolution: "undici-types@npm:6.19.8"
checksum: 10/cf0b48ed4fc99baf56584afa91aaffa5010c268b8842f62e02f752df209e3dea138b372a60a963b3b2576ed932f32329ce7ddb9cb5f27a6c83040d8cd74b7a70