mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-18 00:31:00 -05:00
Compare commits
10 Commits
66c6dc9aa3
...
6a254e897e
Author | SHA1 | Date | |
---|---|---|---|
|
6a254e897e | ||
|
b14de3201d | ||
|
0ad5c2cc37 | ||
|
a2fe3afdb7 | ||
|
9d1c8dd238 | ||
|
754881c93f | ||
|
59ba9abccf | ||
|
8abe1dfaf2 | ||
|
a6596e5d7e | ||
|
067cc33076 |
131
.pnp.cjs
generated
131
.pnp.cjs
generated
@ -26,12 +26,12 @@ const RAW_RUNTIME_STATE =
|
||||
[null, {\
|
||||
"packageLocation": "./",\
|
||||
"packageDependencies": [\
|
||||
["@napi-rs/canvas", "npm:0.1.50"],\
|
||||
["@napi-rs/canvas", "npm:0.1.51"],\
|
||||
["@octokit/rest", "npm:20.0.2"],\
|
||||
["@sequelize/core", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:7.0.0-alpha.37"],\
|
||||
["@toast/tokenservice-client", "npm:1.0.14::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.14%2Ftokenservice-client-1.0.14.tgz"],\
|
||||
["@toast/tokenservice-client", "npm:1.0.16::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.16%2Ftokenservice-client-1.0.16.tgz"],\
|
||||
["@types/ms", "npm:0.7.34"],\
|
||||
["@types/node", "npm:20.11.24"],\
|
||||
["@types/node", "npm:20.11.25"],\
|
||||
["@types/node-cron", "npm:3.0.11"],\
|
||||
["@types/pg", "npm:8.11.2"],\
|
||||
["ansi-colors", "npm:4.1.3"],\
|
||||
@ -47,8 +47,8 @@ const RAW_RUNTIME_STATE =
|
||||
["redis", "npm:4.6.13"],\
|
||||
["simple-git", "npm:3.22.0"],\
|
||||
["systeminformation", "npm:5.22.0"],\
|
||||
["typescript", "patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"],\
|
||||
["undici", "npm:6.7.0"]\
|
||||
["typescript", "patch:typescript@npm%3A5.4.2#optional!builtin<compat/typescript>::version=5.4.2&hash=5adc0c"],\
|
||||
["undici", "npm:6.7.1"]\
|
||||
],\
|
||||
"linkType": "SOFT"\
|
||||
}]\
|
||||
@ -179,100 +179,100 @@ const RAW_RUNTIME_STATE =
|
||||
}]\
|
||||
]],\
|
||||
["@napi-rs/canvas", [\
|
||||
["npm:0.1.50", {\
|
||||
"packageLocation": "./.yarn/cache/@napi-rs-canvas-npm-0.1.50-6d57a400a9-c9ed3ecdaa.zip/node_modules/@napi-rs/canvas/",\
|
||||
["npm:0.1.51", {\
|
||||
"packageLocation": "./.yarn/cache/@napi-rs-canvas-npm-0.1.51-af269bc98a-10d4e8f884.zip/node_modules/@napi-rs/canvas/",\
|
||||
"packageDependencies": [\
|
||||
["@napi-rs/canvas", "npm:0.1.50"],\
|
||||
["@napi-rs/canvas-android-arm64", "npm:0.1.50"],\
|
||||
["@napi-rs/canvas-darwin-arm64", "npm:0.1.50"],\
|
||||
["@napi-rs/canvas-darwin-x64", "npm:0.1.50"],\
|
||||
["@napi-rs/canvas-linux-arm-gnueabihf", "npm:0.1.50"],\
|
||||
["@napi-rs/canvas-linux-arm64-gnu", "npm:0.1.50"],\
|
||||
["@napi-rs/canvas-linux-arm64-musl", "npm:0.1.50"],\
|
||||
["@napi-rs/canvas-linux-x64-gnu", "npm:0.1.50"],\
|
||||
["@napi-rs/canvas-linux-x64-musl", "npm:0.1.50"],\
|
||||
["@napi-rs/canvas-win32-x64-msvc", "npm:0.1.50"]\
|
||||
["@napi-rs/canvas", "npm:0.1.51"],\
|
||||
["@napi-rs/canvas-android-arm64", "npm:0.1.51"],\
|
||||
["@napi-rs/canvas-darwin-arm64", "npm:0.1.51"],\
|
||||
["@napi-rs/canvas-darwin-x64", "npm:0.1.51"],\
|
||||
["@napi-rs/canvas-linux-arm-gnueabihf", "npm:0.1.51"],\
|
||||
["@napi-rs/canvas-linux-arm64-gnu", "npm:0.1.51"],\
|
||||
["@napi-rs/canvas-linux-arm64-musl", "npm:0.1.51"],\
|
||||
["@napi-rs/canvas-linux-x64-gnu", "npm:0.1.51"],\
|
||||
["@napi-rs/canvas-linux-x64-musl", "npm:0.1.51"],\
|
||||
["@napi-rs/canvas-win32-x64-msvc", "npm:0.1.51"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@napi-rs/canvas-android-arm64", [\
|
||||
["npm:0.1.50", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-android-arm64-npm-0.1.50-11d6135d75/node_modules/@napi-rs/canvas-android-arm64/",\
|
||||
["npm:0.1.51", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-android-arm64-npm-0.1.51-34205099a0/node_modules/@napi-rs/canvas-android-arm64/",\
|
||||
"packageDependencies": [\
|
||||
["@napi-rs/canvas-android-arm64", "npm:0.1.50"]\
|
||||
["@napi-rs/canvas-android-arm64", "npm:0.1.51"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@napi-rs/canvas-darwin-arm64", [\
|
||||
["npm:0.1.50", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-darwin-arm64-npm-0.1.50-6b2d108329/node_modules/@napi-rs/canvas-darwin-arm64/",\
|
||||
["npm:0.1.51", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-darwin-arm64-npm-0.1.51-dbc0153384/node_modules/@napi-rs/canvas-darwin-arm64/",\
|
||||
"packageDependencies": [\
|
||||
["@napi-rs/canvas-darwin-arm64", "npm:0.1.50"]\
|
||||
["@napi-rs/canvas-darwin-arm64", "npm:0.1.51"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@napi-rs/canvas-darwin-x64", [\
|
||||
["npm:0.1.50", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-darwin-x64-npm-0.1.50-b670722e63/node_modules/@napi-rs/canvas-darwin-x64/",\
|
||||
["npm:0.1.51", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-darwin-x64-npm-0.1.51-58ab818cac/node_modules/@napi-rs/canvas-darwin-x64/",\
|
||||
"packageDependencies": [\
|
||||
["@napi-rs/canvas-darwin-x64", "npm:0.1.50"]\
|
||||
["@napi-rs/canvas-darwin-x64", "npm:0.1.51"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@napi-rs/canvas-linux-arm-gnueabihf", [\
|
||||
["npm:0.1.50", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-linux-arm-gnueabihf-npm-0.1.50-74ef8d8007/node_modules/@napi-rs/canvas-linux-arm-gnueabihf/",\
|
||||
["npm:0.1.51", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-linux-arm-gnueabihf-npm-0.1.51-61ee4ee217/node_modules/@napi-rs/canvas-linux-arm-gnueabihf/",\
|
||||
"packageDependencies": [\
|
||||
["@napi-rs/canvas-linux-arm-gnueabihf", "npm:0.1.50"]\
|
||||
["@napi-rs/canvas-linux-arm-gnueabihf", "npm:0.1.51"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@napi-rs/canvas-linux-arm64-gnu", [\
|
||||
["npm:0.1.50", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-linux-arm64-gnu-npm-0.1.50-c8c1e133bc/node_modules/@napi-rs/canvas-linux-arm64-gnu/",\
|
||||
["npm:0.1.51", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-linux-arm64-gnu-npm-0.1.51-f1ee66dd14/node_modules/@napi-rs/canvas-linux-arm64-gnu/",\
|
||||
"packageDependencies": [\
|
||||
["@napi-rs/canvas-linux-arm64-gnu", "npm:0.1.50"]\
|
||||
["@napi-rs/canvas-linux-arm64-gnu", "npm:0.1.51"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@napi-rs/canvas-linux-arm64-musl", [\
|
||||
["npm:0.1.50", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-linux-arm64-musl-npm-0.1.50-c675999c51/node_modules/@napi-rs/canvas-linux-arm64-musl/",\
|
||||
["npm:0.1.51", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-linux-arm64-musl-npm-0.1.51-944cfbf386/node_modules/@napi-rs/canvas-linux-arm64-musl/",\
|
||||
"packageDependencies": [\
|
||||
["@napi-rs/canvas-linux-arm64-musl", "npm:0.1.50"]\
|
||||
["@napi-rs/canvas-linux-arm64-musl", "npm:0.1.51"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@napi-rs/canvas-linux-x64-gnu", [\
|
||||
["npm:0.1.50", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-linux-x64-gnu-npm-0.1.50-a8ca0545bd/node_modules/@napi-rs/canvas-linux-x64-gnu/",\
|
||||
["npm:0.1.51", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-linux-x64-gnu-npm-0.1.51-057f6a7370/node_modules/@napi-rs/canvas-linux-x64-gnu/",\
|
||||
"packageDependencies": [\
|
||||
["@napi-rs/canvas-linux-x64-gnu", "npm:0.1.50"]\
|
||||
["@napi-rs/canvas-linux-x64-gnu", "npm:0.1.51"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@napi-rs/canvas-linux-x64-musl", [\
|
||||
["npm:0.1.50", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-linux-x64-musl-npm-0.1.50-65f7471d30/node_modules/@napi-rs/canvas-linux-x64-musl/",\
|
||||
["npm:0.1.51", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-linux-x64-musl-npm-0.1.51-c96e16ae54/node_modules/@napi-rs/canvas-linux-x64-musl/",\
|
||||
"packageDependencies": [\
|
||||
["@napi-rs/canvas-linux-x64-musl", "npm:0.1.50"]\
|
||||
["@napi-rs/canvas-linux-x64-musl", "npm:0.1.51"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@napi-rs/canvas-win32-x64-msvc", [\
|
||||
["npm:0.1.50", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-win32-x64-msvc-npm-0.1.50-52fd2a856e/node_modules/@napi-rs/canvas-win32-x64-msvc/",\
|
||||
["npm:0.1.51", {\
|
||||
"packageLocation": "./.yarn/unplugged/@napi-rs-canvas-win32-x64-msvc-npm-0.1.51-de823ce2f1/node_modules/@napi-rs/canvas-win32-x64-msvc/",\
|
||||
"packageDependencies": [\
|
||||
["@napi-rs/canvas-win32-x64-msvc", "npm:0.1.50"]\
|
||||
["@napi-rs/canvas-win32-x64-msvc", "npm:0.1.51"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
@ -709,10 +709,10 @@ const RAW_RUNTIME_STATE =
|
||||
}]\
|
||||
]],\
|
||||
["@toast/tokenservice-client", [\
|
||||
["npm:1.0.14::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.14%2Ftokenservice-client-1.0.14.tgz", {\
|
||||
"packageLocation": "./.yarn/cache/@toast-tokenservice-client-npm-1.0.14-8e8e9cba19-b478e70965.zip/node_modules/@toast/tokenservice-client/",\
|
||||
["npm:1.0.16::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.16%2Ftokenservice-client-1.0.16.tgz", {\
|
||||
"packageLocation": "./.yarn/cache/@toast-tokenservice-client-npm-1.0.16-de708ec9ce-a946df28f2.zip/node_modules/@toast/tokenservice-client/",\
|
||||
"packageDependencies": [\
|
||||
["@toast/tokenservice-client", "npm:1.0.14::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.14%2Ftokenservice-client-1.0.14.tgz"],\
|
||||
["@toast/tokenservice-client", "npm:1.0.16::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.16%2Ftokenservice-client-1.0.16.tgz"],\
|
||||
["undici", "npm:6.7.0"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
@ -738,10 +738,10 @@ const RAW_RUNTIME_STATE =
|
||||
}]\
|
||||
]],\
|
||||
["@types/node", [\
|
||||
["npm:20.11.24", {\
|
||||
"packageLocation": "./.yarn/cache/@types-node-npm-20.11.24-4e19eedf98-7f34bfae5f.zip/node_modules/@types/node/",\
|
||||
["npm:20.11.25", {\
|
||||
"packageLocation": "./.yarn/cache/@types-node-npm-20.11.25-b6ac39dd46-861265f1bb.zip/node_modules/@types/node/",\
|
||||
"packageDependencies": [\
|
||||
["@types/node", "npm:20.11.24"],\
|
||||
["@types/node", "npm:20.11.25"],\
|
||||
["undici-types", "npm:5.26.5"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
@ -761,7 +761,7 @@ const RAW_RUNTIME_STATE =
|
||||
"packageLocation": "./.yarn/cache/@types-pg-npm-8.11.2-bdf321bea4-7c05cf63be.zip/node_modules/@types/pg/",\
|
||||
"packageDependencies": [\
|
||||
["@types/pg", "npm:8.11.2"],\
|
||||
["@types/node", "npm:20.11.24"],\
|
||||
["@types/node", "npm:20.11.25"],\
|
||||
["pg-protocol", "npm:1.6.0"],\
|
||||
["pg-types", "npm:4.0.2"]\
|
||||
],\
|
||||
@ -782,7 +782,7 @@ const RAW_RUNTIME_STATE =
|
||||
"packageLocation": "./.yarn/cache/@types-ws-npm-8.5.10-a877a38f71-9b414dc5e0.zip/node_modules/@types/ws/",\
|
||||
"packageDependencies": [\
|
||||
["@types/ws", "npm:8.5.10"],\
|
||||
["@types/node", "npm:20.11.24"]\
|
||||
["@types/node", "npm:20.11.25"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}],\
|
||||
@ -790,7 +790,7 @@ const RAW_RUNTIME_STATE =
|
||||
"packageLocation": "./.yarn/cache/@types-ws-npm-8.5.9-91d1b2ab07-7cf66383b8.zip/node_modules/@types/ws/",\
|
||||
"packageDependencies": [\
|
||||
["@types/ws", "npm:8.5.9"],\
|
||||
["@types/node", "npm:20.11.24"]\
|
||||
["@types/node", "npm:20.11.25"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
@ -873,12 +873,12 @@ const RAW_RUNTIME_STATE =
|
||||
"packageLocation": "./",\
|
||||
"packageDependencies": [\
|
||||
["daggerbot-ts", "workspace:."],\
|
||||
["@napi-rs/canvas", "npm:0.1.50"],\
|
||||
["@napi-rs/canvas", "npm:0.1.51"],\
|
||||
["@octokit/rest", "npm:20.0.2"],\
|
||||
["@sequelize/core", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:7.0.0-alpha.37"],\
|
||||
["@toast/tokenservice-client", "npm:1.0.14::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.14%2Ftokenservice-client-1.0.14.tgz"],\
|
||||
["@toast/tokenservice-client", "npm:1.0.16::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.16%2Ftokenservice-client-1.0.16.tgz"],\
|
||||
["@types/ms", "npm:0.7.34"],\
|
||||
["@types/node", "npm:20.11.24"],\
|
||||
["@types/node", "npm:20.11.25"],\
|
||||
["@types/node-cron", "npm:3.0.11"],\
|
||||
["@types/pg", "npm:8.11.2"],\
|
||||
["ansi-colors", "npm:4.1.3"],\
|
||||
@ -894,8 +894,8 @@ const RAW_RUNTIME_STATE =
|
||||
["redis", "npm:4.6.13"],\
|
||||
["simple-git", "npm:3.22.0"],\
|
||||
["systeminformation", "npm:5.22.0"],\
|
||||
["typescript", "patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"],\
|
||||
["undici", "npm:6.7.0"]\
|
||||
["typescript", "patch:typescript@npm%3A5.4.2#optional!builtin<compat/typescript>::version=5.4.2&hash=5adc0c"],\
|
||||
["undici", "npm:6.7.1"]\
|
||||
],\
|
||||
"linkType": "SOFT"\
|
||||
}]\
|
||||
@ -1678,10 +1678,10 @@ const RAW_RUNTIME_STATE =
|
||||
}]\
|
||||
]],\
|
||||
["typescript", [\
|
||||
["patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7", {\
|
||||
"packageLocation": "./.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/",\
|
||||
["patch:typescript@npm%3A5.4.2#optional!builtin<compat/typescript>::version=5.4.2&hash=5adc0c", {\
|
||||
"packageLocation": "./.yarn/cache/typescript-patch-c145cea93e-f5f9a4133c.zip/node_modules/typescript/",\
|
||||
"packageDependencies": [\
|
||||
["typescript", "patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"]\
|
||||
["typescript", "patch:typescript@npm%3A5.4.2#optional!builtin<compat/typescript>::version=5.4.2&hash=5adc0c"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
@ -1711,6 +1711,13 @@ const RAW_RUNTIME_STATE =
|
||||
["@fastify/busboy", "npm:2.1.1"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}],\
|
||||
["npm:6.7.1", {\
|
||||
"packageLocation": "./.yarn/cache/undici-npm-6.7.1-cc741edc29-7e66eb7fb6.zip/node_modules/undici/",\
|
||||
"packageDependencies": [\
|
||||
["undici", "npm:6.7.1"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["undici-types", [\
|
||||
@ -1761,7 +1768,7 @@ const RAW_RUNTIME_STATE =
|
||||
"packageLocation": "./.yarn/cache/wkx-npm-0.5.0-fca5152cd8-b8975e33f9.zip/node_modules/wkx/",\
|
||||
"packageDependencies": [\
|
||||
["wkx", "npm:0.5.0"],\
|
||||
["@types/node", "npm:20.11.24"]\
|
||||
["@types/node", "npm:20.11.25"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
|
@ -1,5 +1,5 @@
|
||||
FROM node:21.1.0-bookworm-slim
|
||||
ENV YARN_VERSION 4.1.0
|
||||
ENV YARN_VERSION 4.1.1
|
||||
ENV TZ Australia/Sydney
|
||||
RUN yarn policies set-version $YARN_VERSION
|
||||
RUN apt update -y && apt upgrade -y && apt install -y git fontconfig && npm install -g typescript
|
||||
|
12
package.json
12
package.json
@ -25,12 +25,12 @@
|
||||
"npm": "yarn is required, dont use npm"
|
||||
},
|
||||
"engineStrict": true,
|
||||
"packageManager": "yarn@4.1.0+sha256.81a00df816059803e6b5148acf03ce313cad36b7f6e5af6efa040a15981a6ffb",
|
||||
"packageManager": "yarn@4.1.1+sha256.f3cc0eda8e5560e529c7147565b30faa43b4e472d90e8634d7134a37c7f59781",
|
||||
"dependencies": {
|
||||
"@napi-rs/canvas": "0.1.50",
|
||||
"@napi-rs/canvas": "0.1.51",
|
||||
"@octokit/rest": "20.0.2",
|
||||
"@sequelize/core": "7.0.0-alpha.37",
|
||||
"@toast/tokenservice-client": "1.0.14",
|
||||
"@toast/tokenservice-client": "1.0.16",
|
||||
"ansi-colors": "4.1.3",
|
||||
"dayjs": "1.11.10",
|
||||
"discord.js": "14.14.1",
|
||||
@ -44,13 +44,13 @@
|
||||
"redis": "4.6.13",
|
||||
"simple-git": "3.22.0",
|
||||
"systeminformation": "5.22.0",
|
||||
"undici": "6.7.0"
|
||||
"undici": "6.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/ms": "0.7.34",
|
||||
"@types/node": "20.11.24",
|
||||
"@types/node": "20.11.25",
|
||||
"@types/node-cron": "3.0.11",
|
||||
"@types/pg": "8.11.2",
|
||||
"typescript": "5.3.3"
|
||||
"typescript": "5.4.2"
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import Formatters from '../helpers/Formatters.js';
|
||||
import MessageTool from '../helpers/MessageTool.js';
|
||||
export default class Case {
|
||||
private static async updateEntry(client:TClient, caseId:number, reason:string) {
|
||||
const logsArray = [client.config.dcServer.channels.logs, client.config.dcServer.channels.bankick_log];
|
||||
const logsArray = [client.config.dcServer.channels.bot_log, client.config.dcServer.channels.bankick_log];
|
||||
for (const channelID of logsArray) {
|
||||
const channel = await client.channels.fetch(channelID) as Discord.TextChannel;
|
||||
if (channel && channel.type === Discord.ChannelType.GuildText) {
|
||||
|
@ -9,7 +9,7 @@ import util from 'node:util';
|
||||
import fs from 'node:fs';
|
||||
export default class Developer {
|
||||
static run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>) {
|
||||
if (!client.config.whitelist.includes(interaction.user.id)) return MessageTool.youNeedRole(interaction, 'bottech');
|
||||
if (!client.config.whitelist.includes(interaction.member.id)) return MessageTool.isWhitelisted(interaction);
|
||||
({
|
||||
eval: async()=>{
|
||||
fs;
|
||||
@ -128,7 +128,7 @@ export default class Developer {
|
||||
const member = interaction.options.getMember('member');
|
||||
const message = interaction.options.getString('message');
|
||||
const int = await interaction.reply({content: '*Sending...*', fetchReply: true});
|
||||
client.users.cache.get(member.id).send(`${message}\n╰ ${interaction.member.displayName}`).then(()=>int.edit(`Successfully sent a DM to **${member.user.username}** with the following message:\n\`\`\`${message}\`\`\``)).catch((e:Error)=>int.edit(`\`${e.message}\``))
|
||||
client.users.cache.get(member.id).send(`${message}\n╰ *Pseudonymous User*`).then(()=>int.edit(`Successfully sent a DM to **${member.user.username}** with the following message:\n\`\`\`${message}\`\`\``)).catch((e:Error)=>int.edit(`\`${e.message}\``))
|
||||
},
|
||||
modify_rank_msgs: async()=>{
|
||||
if (interaction.guildId !== client.config.dcServer.id) return interaction.reply({content: 'This command is only available in the main server.', ephemeral: true});
|
||||
|
@ -118,7 +118,7 @@ export default class MP {
|
||||
},
|
||||
maintenance: async()=>{
|
||||
if (client.config.dcServer.id === interaction.guildId) {
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmod) && !interaction.member.roles.cache.has(client.config.dcServer.roles.bottech)) return MessageTool.youNeedRole(interaction, 'mpmod');
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmod) && !client.config.whitelist.includes(interaction.member.id)) return MessageTool.youNeedRole(interaction, 'mpmod');
|
||||
}
|
||||
|
||||
const reason = interaction.options.getString('reason');
|
||||
@ -133,7 +133,7 @@ export default class MP {
|
||||
},
|
||||
start: async()=>{
|
||||
if (client.config.dcServer.id === interaction.guildId) {
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmod) && !interaction.member.roles.cache.has(client.config.dcServer.roles.bottech)) return MessageTool.youNeedRole(interaction, 'mpmod');
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmod) && !client.config.whitelist.includes(interaction.member.id)) return MessageTool.youNeedRole(interaction, 'mpmod');
|
||||
}
|
||||
const map_names = interaction.options.getString('map_names', true).split('|');
|
||||
if (map_names.length > 10) return interaction.reply('You can only have up to 10 maps in a poll!');
|
||||
@ -150,7 +150,7 @@ export default class MP {
|
||||
},
|
||||
end: async()=>{
|
||||
if (client.config.dcServer.id === interaction.guildId) {
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmod) && !interaction.member.roles.cache.has(client.config.dcServer.roles.bottech)) return MessageTool.youNeedRole(interaction, 'mpmod');
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmod) && !client.config.whitelist.includes(interaction.member.id)) return MessageTool.youNeedRole(interaction, 'mpmod');
|
||||
}
|
||||
const msg_id = interaction.options.getString('message_id', true);
|
||||
const stripUrl = msg_id.replace(/https:\/\/discord.com\/channels\/\d+\/\d+\/(\d+)/, '$1');
|
||||
@ -172,14 +172,14 @@ export default class MP {
|
||||
},
|
||||
maps: async()=>{
|
||||
if (client.config.dcServer.id === interaction.guildId) {
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmod) && !interaction.member.roles.cache.has(client.config.dcServer.roles.bottech)) return MessageTool.youNeedRole(interaction, 'mpmod');
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmod) && !client.config.whitelist.includes(interaction.member.id)) return MessageTool.youNeedRole(interaction, 'mpmod');
|
||||
}
|
||||
const suggestionPool = await (interaction.guild.channels.cache.get(client.config.dcServer.channels.mpmod_chat) as Discord.TextChannel).messages.fetch(MAP_POOL_HOOKMSG);
|
||||
interaction.reply({embeds: [suggestionPool.embeds[0]]});
|
||||
}, // Server management group
|
||||
create_server: async()=>{
|
||||
if (client.config.dcServer.id === interaction.guildId) {
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmanager) && !interaction.member.roles.cache.has(client.config.dcServer.roles.bottech)) return MessageTool.youNeedRole(interaction, 'mpmanager');
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmanager) && !client.config.whitelist.includes(interaction.member.id)) return MessageTool.youNeedRole(interaction, 'mpmanager');
|
||||
}
|
||||
const dedicatedServerStatsURL = interaction.options.getString('dss-url');
|
||||
if (!dedicatedServerStatsURL) {
|
||||
@ -201,7 +201,7 @@ export default class MP {
|
||||
},
|
||||
remove_server: async()=>{
|
||||
if (client.config.dcServer.id === interaction.guildId) {
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmanager) && !interaction.member.roles.cache.has(client.config.dcServer.roles.bottech)) return MessageTool.youNeedRole(interaction, 'mpmanager');
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmanager) && !client.config.whitelist.includes(interaction.member.id)) return MessageTool.youNeedRole(interaction, 'mpmanager');
|
||||
}
|
||||
try {
|
||||
Logger.console('log', logPrefix, `Removing "${choiceSelector}" from database`)
|
||||
@ -214,7 +214,7 @@ export default class MP {
|
||||
},
|
||||
visibility_toggle: async()=>{
|
||||
if (client.config.dcServer.id === interaction.guildId) {
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmanager) && !interaction.member.roles.cache.has(client.config.dcServer.roles.bottech)) return MessageTool.youNeedRole(interaction, 'mpmanager');
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.mpmanager) && !client.config.whitelist.includes(interaction.member.id)) return MessageTool.youNeedRole(interaction, 'mpmanager');
|
||||
}
|
||||
const toggleFlag = interaction.options.getBoolean('is_active');
|
||||
Logger.console('log', logPrefix, `Toggling isActive flag for "${choiceSelector}" to ${toggleFlag}`);
|
||||
|
@ -61,7 +61,7 @@ export default class Rank {
|
||||
const member = interaction.options.getMember('member');
|
||||
const duration = ms(interaction.options.getString('duration'));
|
||||
const reason = interaction.options.getString('reason');
|
||||
const botlog = interaction.guild.channels.cache.get(client.config.dcServer.channels.logs) as Discord.TextChannel;
|
||||
const botlog = interaction.guild.channels.cache.get(client.config.dcServer.channels.bot_log) as Discord.TextChannel;
|
||||
|
||||
if (await client.userLevels.blockUser(member.id, Date.now() + duration)) {
|
||||
await interaction.reply(`Done, DM has been sent to **${member.displayName}** with the reason.`);
|
||||
|
@ -14,7 +14,7 @@ export default class Suggest {
|
||||
},
|
||||
delete: async()=>{
|
||||
if (client.config.dcServer.id === interaction.guildId) {
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.bottech)) return MessageTool.youNeedRole(interaction, 'bottech');
|
||||
if (!client.config.whitelist.includes(interaction.member.id)) return MessageTool.isWhitelisted(interaction);
|
||||
}
|
||||
const sugg = await this.deleteSuggestion(client, idVal);
|
||||
if (sugg) return interaction.reply(`Suggestion \`#${idVal}\` has been deleted.`);
|
||||
@ -22,7 +22,7 @@ export default class Suggest {
|
||||
},
|
||||
update: async()=>{
|
||||
if (client.config.dcServer.id === interaction.guildId) {
|
||||
if (!interaction.member.roles.cache.has(client.config.dcServer.roles.bottech)) return MessageTool.youNeedRole(interaction, 'bottech');
|
||||
if (!client.config.whitelist.includes(interaction.member.id)) return MessageTool.isWhitelisted(interaction);
|
||||
}
|
||||
const status = interaction.options.getString('status', true);
|
||||
await this.updateSuggestion(client, idVal, status as 'Accepted'|'Rejected');
|
||||
|
@ -37,7 +37,8 @@
|
||||
"190407856527376384",
|
||||
"141304507249197057",
|
||||
"309373272594579456",
|
||||
"301350210926280704"
|
||||
"301350210926280704",
|
||||
"475037861725339649"
|
||||
],
|
||||
"contribList": [
|
||||
"190407856527376384",
|
||||
@ -60,7 +61,6 @@
|
||||
],
|
||||
"roles": {
|
||||
"admin": "468842789053136897",
|
||||
"bottech": "1011341005389307925",
|
||||
"dcmod": "468841295150972929",
|
||||
"mpmanager": "1028735939813585029",
|
||||
"mpmod": "572151330710487041",
|
||||
@ -76,7 +76,7 @@
|
||||
"thismeanswar": "1091300529696673792",
|
||||
"bot_suggestions": "1040018521746325586",
|
||||
"bot_status": "1009753780188884992",
|
||||
"logs": "548032776830582794",
|
||||
"bot_log": "548032776830582794",
|
||||
"welcome": "621134751897616406",
|
||||
"botcommands": "468888722210029588",
|
||||
"bankick_log": "1048341961901363352",
|
||||
@ -85,7 +85,8 @@
|
||||
"mpmod_chat": "516344221452599306",
|
||||
"multifarm_chat": "1149238561934151690",
|
||||
"pw_list": "1193424588554645505",
|
||||
"help_forum": "1022236553562558464"
|
||||
"help_forum": "1022236553562558464",
|
||||
"server_log": "1040002995783471265"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
28
src/events/channelUpdate.ts
Normal file
28
src/events/channelUpdate.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import Discord from 'discord.js';
|
||||
import TClient from '../client.js';
|
||||
export default class ChannelUpdate {
|
||||
static async run(_client:TClient, _oldChannel:Discord.GuildChannel, _newChannel:Discord.GuildChannel) {
|
||||
/* if (!client.config.botSwitches.logs) return;
|
||||
if (oldChannel.guild?.id != client.config.dcServer.id) return;
|
||||
|
||||
const auditChupdate = (await newChannel.guild.fetchAuditLogs({limit: 1, type: Discord.AuditLogEvent.ChannelUpdate})).entries.first();
|
||||
if (!auditChupdate) return console.log(`Channel (${oldChannel.name}) was updated but no audit log found for this channel.`);
|
||||
|
||||
const serverLog = client.channels.cache.get(client.config.dcServer.channels.server_log) as Discord.TextChannel;
|
||||
const embed = new client.embed().setColor(client.config.embedColor).setFooter({text: auditChupdate.executor.displayName, iconURL: auditChupdate.executor.displayAvatarURL({size: 2048})}).setTimestamp();
|
||||
|
||||
if (auditChupdate.changes.length > 0) {
|
||||
const changes = auditChupdate.changes;
|
||||
const formatAudit =(auditValue:Discord.AuditLogChange)=>`${auditValue.old ??= 'None'} ➜ ${auditValue.new ??= 'None'}`;
|
||||
|
||||
embed.setTitle(`\`${oldChannel.name}\` was updated`).setTimestamp(auditChupdate.createdTimestamp);
|
||||
for (const change of changes) {
|
||||
if (change.key === 'name') embed.addFields({name: 'Name', value: formatAudit(change), inline: true});
|
||||
if (change.key === 'topic') embed.addFields({name: 'Topic', value: formatAudit(change), inline: true});
|
||||
}
|
||||
|
||||
await serverLog.send({embeds: [embed]});
|
||||
} */
|
||||
}
|
||||
}
|
||||
// Commented out, will be refactored later due to issues.
|
@ -15,7 +15,7 @@ export default class GuildBanAdd {
|
||||
{name: '🔹 Reason', value: reason === null ? 'Reason unspecified': reason}
|
||||
);
|
||||
if (!await client.userLevels.fetchUser(member.user.id)) embed.setFooter({text: 'Rank data has been wiped.'});
|
||||
(client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds: [embed]});
|
||||
(client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({embeds: [embed]});
|
||||
client.memberJoinDates.delete(member.user.id);
|
||||
} else console.log(`User was banned from "${member.guild.name}" but no audit log could be fetched.`)
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ export default class GuildBanRemove {
|
||||
const unbanLog = (await member.guild.fetchAuditLogs({limit: 1, type: Discord.AuditLogEvent.MemberBanRemove})).entries.first();
|
||||
if (!unbanLog) return console.log(`User was unbanned from ${member.guild.name} but no audit log for this user.`)
|
||||
const { executor, target, reason } = unbanLog;
|
||||
if (target.id === member.user.id) (client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds: [
|
||||
if (target.id === member.user.id) (client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({embeds: [
|
||||
new client.embed().setColor(client.config.embedColorGreen).setTimestamp().setThumbnail(member.user.displayAvatarURL({size: 2048})).setTitle(`Member Unbanned: ${target.username}`).setDescription(`🔹 **User**\n<@${target.id}>\n\`${target.id}\``).addFields(
|
||||
{name: '🔹 Moderator', value: `<@${executor.id}>\n\`${executor.id}\``},
|
||||
{name: '🔹 Reason', value: `${reason === null ? 'Reason unspecified.': reason}`}
|
||||
|
@ -22,7 +22,7 @@ export default class GuildMemberAdd {
|
||||
const newInvites = await member.guild.invites.fetch();
|
||||
const usedInvite = newInvites.find((inv:Discord.Invite)=>client.invites.get(inv.code)?.uses < inv.uses);
|
||||
newInvites.forEach((inv:Discord.Invite)=>client.invites.set(inv.code,{uses: inv.uses, creator: inv.inviterId, channel: inv.channel.name}));
|
||||
(client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds: [
|
||||
(client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({embeds: [
|
||||
new client.embed().setColor(client.config.embedColorGreen).setTimestamp().setThumbnail(member.user.displayAvatarURL({size: 2048})).setTitle(`${isBot} Joined: ${member.user.username}`).setFooter({text: `Total members: ${index}${suffix} | ID: ${member.user.id}`}).addFields(
|
||||
{name: '🔹 Account Creation Date', value: `<t:${Math.round(member.user.createdTimestamp/1000)}>\n<t:${Math.round(member.user.createdTimestamp/1000)}:R>`},
|
||||
{name: '🔹 Invite Data:', value: usedInvite ? `Invite: \`${usedInvite.code}\`\nCreated by: **${usedInvite.inviter?.username}**\nChannel: **#${usedInvite.channel.name}**` : 'No invite data could be fetched.'}
|
||||
|
@ -16,7 +16,7 @@ export default class GuildMemberRemove {
|
||||
{name: `🔹 Roles: ${member.roles.cache.size - 1}`, value: `${member.roles.cache.size > 1 ? member.roles.cache.filter((x)=>x.id !== member.guild.roles.everyone.id).sort((a,b)=>b.position - a.position).map(x=>x).join(member.roles.cache.size > 4 ? ' ' : '\n').slice(0,1024) : 'No roles'}`, inline: true}
|
||||
);
|
||||
if (levelData && levelData.dataValues.messages > 1) embed.addFields({name: '🔹 Total messages', value: levelData.dataValues.messages.toLocaleString('en-US'), inline: true});
|
||||
(client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds: [embed]});
|
||||
(client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({embeds: [embed]});
|
||||
await client.userLevels.deleteUser(member.id);
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ export default class GuildMemberUpdate {
|
||||
static run(client:TClient, oldMember:Discord.GuildMember, newMember:Discord.GuildMember){
|
||||
if (oldMember.guild.id != client.config.dcServer.id) return;
|
||||
if (!client.config.botSwitches.logs) return;
|
||||
const channel = (client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel);
|
||||
const channel = (client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel);
|
||||
if (oldMember.nickname != newMember.nickname){
|
||||
const embed = new client.embed().setColor(client.config.embedColor).setTimestamp().setThumbnail(newMember.displayAvatarURL({size: 2048})).setTitle(`Nickname updated: ${newMember.user.username}`).setDescription(`<@${newMember.user.id}>\n\`${newMember.user.id}\``)
|
||||
oldMember.nickname === null ? '' : embed.addFields({name: '🔹 Old nickname', value: `\`\`\`${oldMember.nickname}\`\`\``})
|
||||
|
@ -10,7 +10,12 @@ import MessageTool from '../helpers/MessageTool.js';
|
||||
export default class MessageCreate {
|
||||
static async run(client:TClient, message:Discord.Message) {
|
||||
if (message.author.bot) return;
|
||||
if (!message.inGuild()) return (client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel).send({content: `${this.randomEmotes[Math.floor(Math.random()*this.randomEmotes.length)]} ${MessageTool.formatMention(client.config.whitelist[0], 'user')}\n**${message.author.username}** (\`${message.author.id}\`) sent me a DM, their message is:\`\`\`${message.content}\`\`\``, allowedMentions: {parse: ['users']}});
|
||||
if (!message.inGuild()) {
|
||||
let fwdImages:string[] = [];
|
||||
message.attachments.forEach(x=>fwdImages.push(x.url));
|
||||
(client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({content: `${this.randomEmotes[Math.floor(Math.random()*this.randomEmotes.length)]} ${MessageTool.formatMention(client.config.whitelist[0], 'user')}\n**${message.author.username}** (\`${message.author.id}\`) sent me a DM, their message is:\`\`\`${message.content.length < 1 ? '(No content)' : message.content}\`\`\``, files: fwdImages, allowedMentions: {parse: ['users']}});
|
||||
return;
|
||||
}
|
||||
let automodded: boolean;
|
||||
|
||||
if (client.config.botSwitches.automod && !message.member?.roles.cache.has(client.config.dcServer.roles.dcmod) && !message.member?.roles.cache.has(client.config.dcServer.roles.admin) && message.guildId === client.config.dcServer.id) {
|
||||
|
@ -15,6 +15,6 @@ export default class MessageDelete {
|
||||
)
|
||||
const attachments:string[] = [];
|
||||
msg.attachments.forEach(x=>attachments.push(x.url));
|
||||
(client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds: [embed], files: attachments})
|
||||
(client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({embeds: [embed], files: attachments})
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ export default class MessageDeleteBulk {
|
||||
msg.content === undefined ?? null;
|
||||
})) return;
|
||||
|
||||
(client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds: [
|
||||
(client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({embeds: [
|
||||
new client.embed().setColor(client.config.embedColorRed).setTimestamp()
|
||||
.setTitle(`${messages.size} messages were purged`)
|
||||
.setDescription(`\`\`\`${messages.map(msgs=>`${msgs.author?.username}: ${msgs.content}`).reverse().join('\n').slice(0,3900)}\`\`\``)
|
||||
|
@ -10,7 +10,7 @@ export default class MessageUpdate {
|
||||
if (await client.prohibitedWords.findWord(Automoderator.scanMsg(newMsg)) && (!MessageTool.isStaff(newMsg.member))) newMsg.delete();
|
||||
if (!rawSwitches.MESSAGE_UPDATE || rawSwitches.MESSAGE_UPDATE) {
|
||||
rawSwitches.MESSAGE_UPDATE = true;
|
||||
(client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds: [new client.embed().setColor(client.config.embedColor).setTimestamp().setAuthor({name: `Author: ${oldMsg.author.username} (${oldMsg.author.id})`, iconURL: oldMsg.author.displayAvatarURL()}).setTitle('Message edited').addFields({name: 'Old content', value: `\`\`\`${oldMsg.content.length < 1 ? '(Attachment)' : Discord.escapeCodeBlock(oldMsg.content.slice(0,2048))}\`\`\``}, {name: 'New content', value: `\`\`\`${Discord.escapeCodeBlock(newMsg.content.slice(0,2048))}\`\`\``}, {name: 'Channel', value: `<#${oldMsg.channelId}>`})], components: [new Discord.ActionRowBuilder<Discord.ButtonBuilder>().addComponents(new Discord.ButtonBuilder().setStyle(5).setURL(oldMsg.url).setLabel('Jump to message'))]});
|
||||
(client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({embeds: [new client.embed().setColor(client.config.embedColor).setTimestamp().setAuthor({name: `Author: ${oldMsg.author.username} (${oldMsg.author.id})`, iconURL: oldMsg.author.displayAvatarURL()}).setTitle('Message edited').addFields({name: 'Old content', value: `\`\`\`${oldMsg.content.length < 1 ? '(Attachment)' : Discord.escapeCodeBlock(oldMsg.content.slice(0,2048))}\`\`\``}, {name: 'New content', value: `\`\`\`${Discord.escapeCodeBlock(newMsg.content.slice(0,2048))}\`\`\``}, {name: 'Channel', value: `<#${oldMsg.channelId}>`})], components: [new Discord.ActionRowBuilder<Discord.ButtonBuilder>().addComponents(new Discord.ButtonBuilder().setStyle(5).setURL(oldMsg.url).setLabel('Jump to message'))]});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ export default class Ready {
|
||||
const botSwitches = Object.entries(client.config.botSwitches).map(([k, v])=>`${ansi.yellow(k)}${ansi.black(':')} ${v}`).join('\n').replace(/true/g, ansi.green('true')).replace(/false/g, ansi.red('false'));
|
||||
|
||||
await client.guilds.fetch(client.config.dcServer.id).then(async guild=>{
|
||||
const logsArray = [client.config.dcServer.channels.logs, client.config.dcServer.channels.bankick_log];
|
||||
const logsArray = [client.config.dcServer.channels.bot_log, client.config.dcServer.channels.bankick_log];
|
||||
for (const channelID of logsArray) {
|
||||
const channel = await client.channels.fetch(channelID) as Discord.TextChannel;
|
||||
if (channel && channel.type === Discord.ChannelType.GuildText) await channel.messages.fetch({limit: 15});
|
||||
|
@ -14,4 +14,5 @@ export default class MessageTool {
|
||||
public static isStaff =(guildMember:Discord.GuildMember)=>config.dcServer.staffRoles.map((x:string)=>config.dcServer.roles[x]).some((x:string)=>guildMember.roles.cache.has(x));
|
||||
public static youNeedRole =(interaction:Discord.CommandInteraction, role:keyof typeof config.dcServer.roles)=>interaction.reply(`You do not have ${this.formatMention(config.dcServer.roles[role], 'role')} role to use this command.`);
|
||||
public static isModerator =(guildMember:Discord.GuildMember)=>config.dcServer.staffRoles.filter((x:string)=>/^admin|^dcmod/.test(x)).map((x:string)=>config.dcServer.roles[x]).some((x:string)=>guildMember.roles.cache.has(x));
|
||||
public static isWhitelisted =(interaction:Discord.CommandInteraction)=>interaction.reply('You are not on whitelist!')
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ setInterval(async()=>{
|
||||
|
||||
// Send notification to #bot-log that the data has been pushed to database.
|
||||
const commands = await client.guilds.cache.get(client.config.dcServer.id)?.commands.fetch();
|
||||
if (commands) (client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds: [
|
||||
if (commands) (client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({embeds: [
|
||||
new client.embed().setDescription(`Pushed the following\ndata to </rank leaderboard:${commands.find(x=>x.name === 'rank').id}>`).setFields(
|
||||
{name: 'Day', value: formattedDate.toString(), inline: true},
|
||||
{name: 'Messages', value: Intl.NumberFormat('en-us').format(total).toString(), inline: true}
|
||||
|
6
src/interfaces.d.ts
vendored
6
src/interfaces.d.ts
vendored
@ -136,7 +136,6 @@ export interface Config {
|
||||
staffRoles: string[],
|
||||
roles: {
|
||||
admin: string,
|
||||
bottech: string,
|
||||
dcmod: string,
|
||||
mpmanager: string,
|
||||
mpmod: string,
|
||||
@ -152,7 +151,7 @@ export interface Config {
|
||||
thismeanswar: string,
|
||||
bot_suggestions: string,
|
||||
bot_status: string,
|
||||
logs: string,
|
||||
bot_log: string,
|
||||
welcome: string,
|
||||
botcommands: string,
|
||||
bankick_log: string,
|
||||
@ -161,7 +160,8 @@ export interface Config {
|
||||
mpmod_chat: string,
|
||||
multifarm_chat: string,
|
||||
pw_list: string,
|
||||
help_forum: string
|
||||
help_forum: string,
|
||||
server_log: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ export class PunishmentsSvc {
|
||||
channel = this.client.config.dcServer.channels.bankick_log;
|
||||
break;
|
||||
default:
|
||||
channel = this.client.config.dcServer.channels.logs;
|
||||
channel = this.client.config.dcServer.channels.bot_log;
|
||||
break;
|
||||
}
|
||||
const embed = new this.client.embed()
|
||||
|
@ -123,7 +123,7 @@ export class UserLevelsSvc {
|
||||
|
||||
try {
|
||||
// Send notification to dcServer's logs channel after cronjob is complete.
|
||||
(this.client.channels.resolve(this.client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds: [new this.client.embed()
|
||||
(this.client.channels.resolve(this.client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({embeds: [new this.client.embed()
|
||||
.setColor('#A3FFE3')
|
||||
.setTitle('Yearly data reset has begun!')
|
||||
.setDescription(MessageTool.concatMessage(
|
||||
|
@ -11,12 +11,12 @@
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"baseUrl": "./",
|
||||
"baseUrl": ".",
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"moduleResolution": "bundler",
|
||||
"typeRoots": [ "./src/interfaces.d.ts" ]
|
||||
},
|
||||
"include": [ "src" ],
|
||||
"exclude": [ ".yarn/cache", ".yarn/unplugged", ".git", "src/*.json", "postgres-replica-stuff" ]
|
||||
"exclude": [ ".yarn/cache", ".yarn/unplugged", ".git", "src/*.json" ]
|
||||
}
|
||||
|
129
yarn.lock
129
yarn.lock
@ -116,82 +116,82 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/canvas-android-arm64@npm:0.1.50":
|
||||
version: 0.1.50
|
||||
resolution: "@napi-rs/canvas-android-arm64@npm:0.1.50"
|
||||
"@napi-rs/canvas-android-arm64@npm:0.1.51":
|
||||
version: 0.1.51
|
||||
resolution: "@napi-rs/canvas-android-arm64@npm:0.1.51"
|
||||
conditions: os=android & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/canvas-darwin-arm64@npm:0.1.50":
|
||||
version: 0.1.50
|
||||
resolution: "@napi-rs/canvas-darwin-arm64@npm:0.1.50"
|
||||
"@napi-rs/canvas-darwin-arm64@npm:0.1.51":
|
||||
version: 0.1.51
|
||||
resolution: "@napi-rs/canvas-darwin-arm64@npm:0.1.51"
|
||||
conditions: os=darwin & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/canvas-darwin-x64@npm:0.1.50":
|
||||
version: 0.1.50
|
||||
resolution: "@napi-rs/canvas-darwin-x64@npm:0.1.50"
|
||||
"@napi-rs/canvas-darwin-x64@npm:0.1.51":
|
||||
version: 0.1.51
|
||||
resolution: "@napi-rs/canvas-darwin-x64@npm:0.1.51"
|
||||
conditions: os=darwin & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/canvas-linux-arm-gnueabihf@npm:0.1.50":
|
||||
version: 0.1.50
|
||||
resolution: "@napi-rs/canvas-linux-arm-gnueabihf@npm:0.1.50"
|
||||
"@napi-rs/canvas-linux-arm-gnueabihf@npm:0.1.51":
|
||||
version: 0.1.51
|
||||
resolution: "@napi-rs/canvas-linux-arm-gnueabihf@npm:0.1.51"
|
||||
conditions: os=linux & cpu=arm
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/canvas-linux-arm64-gnu@npm:0.1.50":
|
||||
version: 0.1.50
|
||||
resolution: "@napi-rs/canvas-linux-arm64-gnu@npm:0.1.50"
|
||||
"@napi-rs/canvas-linux-arm64-gnu@npm:0.1.51":
|
||||
version: 0.1.51
|
||||
resolution: "@napi-rs/canvas-linux-arm64-gnu@npm:0.1.51"
|
||||
conditions: os=linux & cpu=arm64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/canvas-linux-arm64-musl@npm:0.1.50":
|
||||
version: 0.1.50
|
||||
resolution: "@napi-rs/canvas-linux-arm64-musl@npm:0.1.50"
|
||||
"@napi-rs/canvas-linux-arm64-musl@npm:0.1.51":
|
||||
version: 0.1.51
|
||||
resolution: "@napi-rs/canvas-linux-arm64-musl@npm:0.1.51"
|
||||
conditions: os=linux & cpu=arm64 & libc=musl
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/canvas-linux-x64-gnu@npm:0.1.50":
|
||||
version: 0.1.50
|
||||
resolution: "@napi-rs/canvas-linux-x64-gnu@npm:0.1.50"
|
||||
"@napi-rs/canvas-linux-x64-gnu@npm:0.1.51":
|
||||
version: 0.1.51
|
||||
resolution: "@napi-rs/canvas-linux-x64-gnu@npm:0.1.51"
|
||||
conditions: os=linux & cpu=x64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/canvas-linux-x64-musl@npm:0.1.50":
|
||||
version: 0.1.50
|
||||
resolution: "@napi-rs/canvas-linux-x64-musl@npm:0.1.50"
|
||||
"@napi-rs/canvas-linux-x64-musl@npm:0.1.51":
|
||||
version: 0.1.51
|
||||
resolution: "@napi-rs/canvas-linux-x64-musl@npm:0.1.51"
|
||||
conditions: os=linux & cpu=x64 & libc=musl
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/canvas-win32-x64-msvc@npm:0.1.50":
|
||||
version: 0.1.50
|
||||
resolution: "@napi-rs/canvas-win32-x64-msvc@npm:0.1.50"
|
||||
"@napi-rs/canvas-win32-x64-msvc@npm:0.1.51":
|
||||
version: 0.1.51
|
||||
resolution: "@napi-rs/canvas-win32-x64-msvc@npm:0.1.51"
|
||||
conditions: os=win32 & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@napi-rs/canvas@npm:0.1.50":
|
||||
version: 0.1.50
|
||||
resolution: "@napi-rs/canvas@npm:0.1.50"
|
||||
"@napi-rs/canvas@npm:0.1.51":
|
||||
version: 0.1.51
|
||||
resolution: "@napi-rs/canvas@npm:0.1.51"
|
||||
dependencies:
|
||||
"@napi-rs/canvas-android-arm64": "npm:0.1.50"
|
||||
"@napi-rs/canvas-darwin-arm64": "npm:0.1.50"
|
||||
"@napi-rs/canvas-darwin-x64": "npm:0.1.50"
|
||||
"@napi-rs/canvas-linux-arm-gnueabihf": "npm:0.1.50"
|
||||
"@napi-rs/canvas-linux-arm64-gnu": "npm:0.1.50"
|
||||
"@napi-rs/canvas-linux-arm64-musl": "npm:0.1.50"
|
||||
"@napi-rs/canvas-linux-x64-gnu": "npm:0.1.50"
|
||||
"@napi-rs/canvas-linux-x64-musl": "npm:0.1.50"
|
||||
"@napi-rs/canvas-win32-x64-msvc": "npm:0.1.50"
|
||||
"@napi-rs/canvas-android-arm64": "npm:0.1.51"
|
||||
"@napi-rs/canvas-darwin-arm64": "npm:0.1.51"
|
||||
"@napi-rs/canvas-darwin-x64": "npm:0.1.51"
|
||||
"@napi-rs/canvas-linux-arm-gnueabihf": "npm:0.1.51"
|
||||
"@napi-rs/canvas-linux-arm64-gnu": "npm:0.1.51"
|
||||
"@napi-rs/canvas-linux-arm64-musl": "npm:0.1.51"
|
||||
"@napi-rs/canvas-linux-x64-gnu": "npm:0.1.51"
|
||||
"@napi-rs/canvas-linux-x64-musl": "npm:0.1.51"
|
||||
"@napi-rs/canvas-win32-x64-msvc": "npm:0.1.51"
|
||||
dependenciesMeta:
|
||||
"@napi-rs/canvas-android-arm64":
|
||||
optional: true
|
||||
@ -211,7 +211,7 @@ __metadata:
|
||||
optional: true
|
||||
"@napi-rs/canvas-win32-x64-msvc":
|
||||
optional: true
|
||||
checksum: 10/c9ed3ecdaa54c82b4a98bbd7a5297b80083e779ab28a929b2a795ef58b436850a40b569b36f93b709d8ae811573680b775688179d8e7d7d6fbd181420c6945ca
|
||||
checksum: 10/10d4e8f8849bd476bfaa0ef169c0cfd9612d61affa5a6e3cb60d7e877a57be1557b6a5a2f4da4cfcb50422828d1dfcb01c5279d5fc319c77ee3b3eb9350bbacc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -498,12 +498,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@toast/tokenservice-client@npm:1.0.14":
|
||||
version: 1.0.14
|
||||
resolution: "@toast/tokenservice-client@npm:1.0.14::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.14%2Ftokenservice-client-1.0.14.tgz"
|
||||
"@toast/tokenservice-client@npm:1.0.16":
|
||||
version: 1.0.16
|
||||
resolution: "@toast/tokenservice-client@npm:1.0.16::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.16%2Ftokenservice-client-1.0.16.tgz"
|
||||
dependencies:
|
||||
undici: "npm:6.7.0"
|
||||
checksum: 10/b478e70965fec7f2f1c492e5ecf4b5d33b5044c29e2391dec3d52e1137e8f4bf3849e587e1830e9469eba5db7505d691cc625846d2a70610af4a91e1f94833e0
|
||||
checksum: 10/a946df28f2ba6e36f881f7160bafe0dfe06227520b2a1a8ace729651064103bce92dcfc0d23deb6df845839f380fbdc17af86b1f1ea11ab3cc513c751ec23fb8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -530,12 +530,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:*, @types/node@npm:20.11.24":
|
||||
version: 20.11.24
|
||||
resolution: "@types/node@npm:20.11.24"
|
||||
"@types/node@npm:*, @types/node@npm:20.11.25":
|
||||
version: 20.11.25
|
||||
resolution: "@types/node@npm:20.11.25"
|
||||
dependencies:
|
||||
undici-types: "npm:~5.26.4"
|
||||
checksum: 10/7f34bfae5f9b98b9910230af4b4c52dc7fb2d1e96fdebfbc3d7576f8ab3d100076f193f9469add9e7418b455294155e7e6a028498cc5e98f9d49349875a459cf
|
||||
checksum: 10/861265f1bbb151404bd8842b595f027a4ff067c61ecff9a37b9f7f53922c18dd532c8e795e8e7675dd8dba056645623fd2b9848d5ef72863ec3609096cd2923e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -637,12 +637,12 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "daggerbot-ts@workspace:."
|
||||
dependencies:
|
||||
"@napi-rs/canvas": "npm:0.1.50"
|
||||
"@napi-rs/canvas": "npm:0.1.51"
|
||||
"@octokit/rest": "npm:20.0.2"
|
||||
"@sequelize/core": "npm:7.0.0-alpha.37"
|
||||
"@toast/tokenservice-client": "npm:1.0.14"
|
||||
"@toast/tokenservice-client": "npm:1.0.16"
|
||||
"@types/ms": "npm:0.7.34"
|
||||
"@types/node": "npm:20.11.24"
|
||||
"@types/node": "npm:20.11.25"
|
||||
"@types/node-cron": "npm:3.0.11"
|
||||
"@types/pg": "npm:8.11.2"
|
||||
ansi-colors: "npm:4.1.3"
|
||||
@ -658,8 +658,8 @@ __metadata:
|
||||
redis: "npm:4.6.13"
|
||||
simple-git: "npm:3.22.0"
|
||||
systeminformation: "npm:5.22.0"
|
||||
typescript: "npm:5.3.3"
|
||||
undici: "npm:6.7.0"
|
||||
typescript: "npm:5.4.2"
|
||||
undici: "npm:6.7.1"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
@ -1310,23 +1310,23 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"typescript@npm:5.3.3":
|
||||
version: 5.3.3
|
||||
resolution: "typescript@npm:5.3.3"
|
||||
"typescript@npm:5.4.2":
|
||||
version: 5.4.2
|
||||
resolution: "typescript@npm:5.4.2"
|
||||
bin:
|
||||
tsc: bin/tsc
|
||||
tsserver: bin/tsserver
|
||||
checksum: 10/6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18
|
||||
checksum: 10/f8cfdc630ab1672f004e9561eb2916935b2d267792d07ce93e97fc601c7a65191af32033d5e9c0169b7dc37da7db9bf320f7432bc84527cb7697effaa4e4559d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>":
|
||||
version: 5.3.3
|
||||
resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"
|
||||
"typescript@patch:typescript@npm%3A5.4.2#optional!builtin<compat/typescript>":
|
||||
version: 5.4.2
|
||||
resolution: "typescript@patch:typescript@npm%3A5.4.2#optional!builtin<compat/typescript>::version=5.4.2&hash=5adc0c"
|
||||
bin:
|
||||
tsc: bin/tsc
|
||||
tsserver: bin/tsserver
|
||||
checksum: 10/c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d
|
||||
checksum: 10/f5f9a4133c2670761f0166eae5b3bafbc4a3fc24f0f42a93c9c893d9e9d6e66ea066969c5e7483fa66b4ae0e99125592553f3b92fd3599484de8be13b0615176
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -1362,6 +1362,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"undici@npm:6.7.1":
|
||||
version: 6.7.1
|
||||
resolution: "undici@npm:6.7.1"
|
||||
checksum: 10/7e66eb7fb6b3641efc9381b335334a7fe0d69d4b8004147b2a7658f279adfd392fb908acf71627e2cd1f863d9ab4d5b1470139364468d486ab69aee43a8246e5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"universal-user-agent@npm:^6.0.0":
|
||||
version: 6.0.1
|
||||
resolution: "universal-user-agent@npm:6.0.1"
|
||||
|
Loading…
Reference in New Issue
Block a user