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

Compare commits

..

No commits in common. "38e87d2d56a2bc90d7535a95fd0c6ebb5fdd56f3" and "a62554e6e90c29141cc53dcce0dde9cf774e8062" have entirely different histories.

15 changed files with 507 additions and 352 deletions

142
.pnp.cjs generated
View File

@ -33,16 +33,17 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@octokit/auth-token", "npm:4.0.0"],\ ["@octokit/auth-token", "npm:4.0.0"],\
["@octokit/rest", "npm:20.0.1"],\ ["@octokit/rest", "npm:20.0.1"],\
["@types/ms", "npm:0.7.31"],\ ["@types/ms", "npm:0.7.31"],\
["@types/node", "npm:20.5.4"],\ ["@types/node", "npm:20.5.1"],\
["axios", "npm:1.4.0"],\
["canvas", "npm:2.11.2"],\ ["canvas", "npm:2.11.2"],\
["discord-player", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:6.6.2"],\ ["discord-player", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:6.6.2"],\
["discord.js", "npm:14.13.0"],\ ["discord.js", "npm:14.13.0"],\
["libsodium-wrappers", "npm:0.7.11"],\ ["libsodium-wrappers", "npm:0.7.11"],\
["moment", "npm:2.29.4"],\ ["moment", "npm:2.29.4"],\
["mongoose", "npm:7.4.4"],\ ["mongoose", "npm:7.4.3"],\
["ms", "npm:2.1.3"],\ ["ms", "npm:2.1.3"],\
["prism-media", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:1.3.5"],\ ["prism-media", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:1.3.5"],\
["systeminformation", "npm:5.19.1"],\ ["systeminformation", "npm:5.18.15"],\
["typescript", "patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=5da071"],\ ["typescript", "patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=5da071"],\
["xml-js", "npm:1.6.11"],\ ["xml-js", "npm:1.6.11"],\
["youtube-sr", "npm:4.3.4"],\ ["youtube-sr", "npm:4.3.4"],\
@ -526,10 +527,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
],\ ],\
"linkType": "HARD"\ "linkType": "HARD"\
}],\ }],\
["npm:20.5.4", {\ ["npm:20.5.1", {\
"packageLocation": "./.yarn/cache/@types-node-npm-20.5.4-6106d4385a-18de76c990.zip/node_modules/@types/node/",\ "packageLocation": "./.yarn/cache/@types-node-npm-20.5.1-d4e9ac5c26-3dbe611cd6.zip/node_modules/@types/node/",\
"packageDependencies": [\ "packageDependencies": [\
["@types/node", "npm:20.5.4"]\ ["@types/node", "npm:20.5.1"]\
],\ ],\
"linkType": "HARD"\ "linkType": "HARD"\
}]\ }]\
@ -677,6 +678,27 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD"\ "linkType": "HARD"\
}]\ }]\
]],\ ]],\
["asynckit", [\
["npm:0.4.0", {\
"packageLocation": "./.yarn/cache/asynckit-npm-0.4.0-c718858525-7b78c451df.zip/node_modules/asynckit/",\
"packageDependencies": [\
["asynckit", "npm:0.4.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["axios", [\
["npm:1.4.0", {\
"packageLocation": "./.yarn/cache/axios-npm-1.4.0-4d7ce8ca3e-7fb6a4313b.zip/node_modules/axios/",\
"packageDependencies": [\
["axios", "npm:1.4.0"],\
["follow-redirects", "virtual:4d7ce8ca3e1e44d82523fba2ad95e1be18c4e9f8dec6d551377587540da3ed75bd8bd3e812280309a3b90cfdb0560f076f3552a20839f7f15665207a4fbd588a#npm:1.15.2"],\
["form-data", "npm:4.0.0"],\
["proxy-from-env", "npm:1.1.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["balanced-match", [\ ["balanced-match", [\
["npm:1.0.2", {\ ["npm:1.0.2", {\
"packageLocation": "./.yarn/cache/balanced-match-npm-1.0.2-a53c126459-9706c088a2.zip/node_modules/balanced-match/",\ "packageLocation": "./.yarn/cache/balanced-match-npm-1.0.2-a53c126459-9706c088a2.zip/node_modules/balanced-match/",\
@ -853,6 +875,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD"\ "linkType": "HARD"\
}]\ }]\
]],\ ]],\
["combined-stream", [\
["npm:1.0.8", {\
"packageLocation": "./.yarn/cache/combined-stream-npm-1.0.8-dc14d4a63a-49fa4aeb49.zip/node_modules/combined-stream/",\
"packageDependencies": [\
["combined-stream", "npm:1.0.8"],\
["delayed-stream", "npm:1.0.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["concat-map", [\ ["concat-map", [\
["npm:0.0.1", {\ ["npm:0.0.1", {\
"packageLocation": "./.yarn/cache/concat-map-npm-0.0.1-85a921b7ee-902a9f5d89.zip/node_modules/concat-map/",\ "packageLocation": "./.yarn/cache/concat-map-npm-0.0.1-85a921b7ee-902a9f5d89.zip/node_modules/concat-map/",\
@ -916,16 +948,17 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@octokit/auth-token", "npm:4.0.0"],\ ["@octokit/auth-token", "npm:4.0.0"],\
["@octokit/rest", "npm:20.0.1"],\ ["@octokit/rest", "npm:20.0.1"],\
["@types/ms", "npm:0.7.31"],\ ["@types/ms", "npm:0.7.31"],\
["@types/node", "npm:20.5.4"],\ ["@types/node", "npm:20.5.1"],\
["axios", "npm:1.4.0"],\
["canvas", "npm:2.11.2"],\ ["canvas", "npm:2.11.2"],\
["discord-player", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:6.6.2"],\ ["discord-player", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:6.6.2"],\
["discord.js", "npm:14.13.0"],\ ["discord.js", "npm:14.13.0"],\
["libsodium-wrappers", "npm:0.7.11"],\ ["libsodium-wrappers", "npm:0.7.11"],\
["moment", "npm:2.29.4"],\ ["moment", "npm:2.29.4"],\
["mongoose", "npm:7.4.4"],\ ["mongoose", "npm:7.4.3"],\
["ms", "npm:2.1.3"],\ ["ms", "npm:2.1.3"],\
["prism-media", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:1.3.5"],\ ["prism-media", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:1.3.5"],\
["systeminformation", "npm:5.19.1"],\ ["systeminformation", "npm:5.18.15"],\
["typescript", "patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=5da071"],\ ["typescript", "patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=5da071"],\
["xml-js", "npm:1.6.11"],\ ["xml-js", "npm:1.6.11"],\
["youtube-sr", "npm:4.3.4"],\ ["youtube-sr", "npm:4.3.4"],\
@ -976,6 +1009,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD"\ "linkType": "HARD"\
}]\ }]\
]],\ ]],\
["delayed-stream", [\
["npm:1.0.0", {\
"packageLocation": "./.yarn/cache/delayed-stream-npm-1.0.0-c5a4c4cc02-46fe6e83e2.zip/node_modules/delayed-stream/",\
"packageDependencies": [\
["delayed-stream", "npm:1.0.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["delegates", [\ ["delegates", [\
["npm:1.0.0", {\ ["npm:1.0.0", {\
"packageLocation": "./.yarn/cache/delegates-npm-1.0.0-9b1942d75f-a51744d9b5.zip/node_modules/delegates/",\ "packageLocation": "./.yarn/cache/delegates-npm-1.0.0-9b1942d75f-a51744d9b5.zip/node_modules/delegates/",\
@ -1232,6 +1274,28 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD"\ "linkType": "HARD"\
}]\ }]\
]],\ ]],\
["follow-redirects", [\
["npm:1.15.2", {\
"packageLocation": "./.yarn/cache/follow-redirects-npm-1.15.2-1ec1dd82be-faa66059b6.zip/node_modules/follow-redirects/",\
"packageDependencies": [\
["follow-redirects", "npm:1.15.2"]\
],\
"linkType": "SOFT"\
}],\
["virtual:4d7ce8ca3e1e44d82523fba2ad95e1be18c4e9f8dec6d551377587540da3ed75bd8bd3e812280309a3b90cfdb0560f076f3552a20839f7f15665207a4fbd588a#npm:1.15.2", {\
"packageLocation": "./.yarn/__virtual__/follow-redirects-virtual-359bc4c55c/0/cache/follow-redirects-npm-1.15.2-1ec1dd82be-faa66059b6.zip/node_modules/follow-redirects/",\
"packageDependencies": [\
["follow-redirects", "virtual:4d7ce8ca3e1e44d82523fba2ad95e1be18c4e9f8dec6d551377587540da3ed75bd8bd3e812280309a3b90cfdb0560f076f3552a20839f7f15665207a4fbd588a#npm:1.15.2"],\
["@types/debug", null],\
["debug", null]\
],\
"packagePeers": [\
"@types/debug",\
"debug"\
],\
"linkType": "HARD"\
}]\
]],\
["foreground-child", [\ ["foreground-child", [\
["npm:3.1.1", {\ ["npm:3.1.1", {\
"packageLocation": "./.yarn/cache/foreground-child-npm-3.1.1-77e78ed774-139d270bc8.zip/node_modules/foreground-child/",\ "packageLocation": "./.yarn/cache/foreground-child-npm-3.1.1-77e78ed774-139d270bc8.zip/node_modules/foreground-child/",\
@ -1243,6 +1307,18 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD"\ "linkType": "HARD"\
}]\ }]\
]],\ ]],\
["form-data", [\
["npm:4.0.0", {\
"packageLocation": "./.yarn/cache/form-data-npm-4.0.0-916facec2d-01135bf867.zip/node_modules/form-data/",\
"packageDependencies": [\
["form-data", "npm:4.0.0"],\
["asynckit", "npm:0.4.0"],\
["combined-stream", "npm:1.0.8"],\
["mime-types", "npm:2.1.35"]\
],\
"linkType": "HARD"\
}]\
]],\
["formdata-polyfill", [\ ["formdata-polyfill", [\
["npm:4.0.10", {\ ["npm:4.0.10", {\
"packageLocation": "./.yarn/cache/formdata-polyfill-npm-4.0.10-e03013c013-82a34df292.zip/node_modules/formdata-polyfill/",\ "packageLocation": "./.yarn/cache/formdata-polyfill-npm-4.0.10-e03013c013-82a34df292.zip/node_modules/formdata-polyfill/",\
@ -1699,6 +1775,25 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD"\ "linkType": "HARD"\
}]\ }]\
]],\ ]],\
["mime-db", [\
["npm:1.52.0", {\
"packageLocation": "./.yarn/cache/mime-db-npm-1.52.0-b5371d6fd2-0d99a03585.zip/node_modules/mime-db/",\
"packageDependencies": [\
["mime-db", "npm:1.52.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["mime-types", [\
["npm:2.1.35", {\
"packageLocation": "./.yarn/cache/mime-types-npm-2.1.35-dd9ea9f3e2-89a5b7f1de.zip/node_modules/mime-types/",\
"packageDependencies": [\
["mime-types", "npm:2.1.35"],\
["mime-db", "npm:1.52.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["mimic-response", [\ ["mimic-response", [\
["npm:2.1.0", {\ ["npm:2.1.0", {\
"packageLocation": "./.yarn/cache/mimic-response-npm-2.1.0-037463e454-014fad6ab9.zip/node_modules/mimic-response/",\ "packageLocation": "./.yarn/cache/mimic-response-npm-2.1.0-037463e454-014fad6ab9.zip/node_modules/mimic-response/",\
@ -1849,10 +1944,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
],\ ],\
"linkType": "SOFT"\ "linkType": "SOFT"\
}],\ }],\
["virtual:806a47d2373274fd76cd2d3daf79db5b84b03c36c63d0a3903a6998364b5ab2d2299d972d445ed6004dba802b10f22f34264a9bdd91c7654035f44410ad707b7#npm:5.7.0", {\ ["virtual:de9b2a4bee48b47472569f051556d00472ad2cae24f303eab2885fcb163b9304e49630ec473487f25346e199b727589de8b538c4c4621c9a5e46486fe0dda3c9#npm:5.7.0", {\
"packageLocation": "./.yarn/__virtual__/mongodb-virtual-e218204750/0/cache/mongodb-npm-5.7.0-c5e415a2e7-16357b6229.zip/node_modules/mongodb/",\ "packageLocation": "./.yarn/__virtual__/mongodb-virtual-3d9fb5213a/0/cache/mongodb-npm-5.7.0-c5e415a2e7-16357b6229.zip/node_modules/mongodb/",\
"packageDependencies": [\ "packageDependencies": [\
["mongodb", "virtual:806a47d2373274fd76cd2d3daf79db5b84b03c36c63d0a3903a6998364b5ab2d2299d972d445ed6004dba802b10f22f34264a9bdd91c7654035f44410ad707b7#npm:5.7.0"],\ ["mongodb", "virtual:de9b2a4bee48b47472569f051556d00472ad2cae24f303eab2885fcb163b9304e49630ec473487f25346e199b727589de8b538c4c4621c9a5e46486fe0dda3c9#npm:5.7.0"],\
["@aws-sdk/credential-providers", null],\ ["@aws-sdk/credential-providers", null],\
["@mongodb-js/zstd", null],\ ["@mongodb-js/zstd", null],\
["@types/aws-sdk__credential-providers", null],\ ["@types/aws-sdk__credential-providers", null],\
@ -1895,13 +1990,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\ }]\
]],\ ]],\
["mongoose", [\ ["mongoose", [\
["npm:7.4.4", {\ ["npm:7.4.3", {\
"packageLocation": "./.yarn/cache/mongoose-npm-7.4.4-806a47d237-54d014b435.zip/node_modules/mongoose/",\ "packageLocation": "./.yarn/cache/mongoose-npm-7.4.3-de9b2a4bee-e92feec9e7.zip/node_modules/mongoose/",\
"packageDependencies": [\ "packageDependencies": [\
["mongoose", "npm:7.4.4"],\ ["mongoose", "npm:7.4.3"],\
["bson", "npm:5.4.0"],\ ["bson", "npm:5.4.0"],\
["kareem", "npm:2.5.1"],\ ["kareem", "npm:2.5.1"],\
["mongodb", "virtual:806a47d2373274fd76cd2d3daf79db5b84b03c36c63d0a3903a6998364b5ab2d2299d972d445ed6004dba802b10f22f34264a9bdd91c7654035f44410ad707b7#npm:5.7.0"],\ ["mongodb", "virtual:de9b2a4bee48b47472569f051556d00472ad2cae24f303eab2885fcb163b9304e49630ec473487f25346e199b727589de8b538c4c4621c9a5e46486fe0dda3c9#npm:5.7.0"],\
["mpath", "npm:0.9.0"],\ ["mpath", "npm:0.9.0"],\
["mquery", "npm:5.0.0"],\ ["mquery", "npm:5.0.0"],\
["ms", "npm:2.1.3"],\ ["ms", "npm:2.1.3"],\
@ -2257,6 +2352,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD"\ "linkType": "HARD"\
}]\ }]\
]],\ ]],\
["proxy-from-env", [\
["npm:1.1.0", {\
"packageLocation": "./.yarn/cache/proxy-from-env-npm-1.1.0-c13d07f26b-ed7fcc2ba0.zip/node_modules/proxy-from-env/",\
"packageDependencies": [\
["proxy-from-env", "npm:1.1.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["punycode", [\ ["punycode", [\
["npm:2.3.0", {\ ["npm:2.3.0", {\
"packageLocation": "./.yarn/cache/punycode-npm-2.3.0-df4bdce06b-39f760e09a.zip/node_modules/punycode/",\ "packageLocation": "./.yarn/cache/punycode-npm-2.3.0-df4bdce06b-39f760e09a.zip/node_modules/punycode/",\
@ -2598,10 +2702,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\ }]\
]],\ ]],\
["systeminformation", [\ ["systeminformation", [\
["npm:5.19.1", {\ ["npm:5.18.15", {\
"packageLocation": "./.yarn/unplugged/systeminformation-npm-5.19.1-586055f0a7/node_modules/systeminformation/",\ "packageLocation": "./.yarn/unplugged/systeminformation-npm-5.18.15-6e7be558fc/node_modules/systeminformation/",\
"packageDependencies": [\ "packageDependencies": [\
["systeminformation", "npm:5.19.1"]\ ["systeminformation", "npm:5.18.15"]\
],\ ],\
"linkType": "HARD"\ "linkType": "HARD"\
}]\ }]\

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
yarnPath: .yarn/releases/yarn-3.6.2.cjs yarnPath: .yarn/releases/yarn-3.6.1.cjs

View File

@ -1,7 +1,3 @@
<p align="center"> ![https://discord.gg/4SnUAFu](https://cdn.discordapp.com/attachments/1015195575693627442/1081877631068295178/DaggerwinServerBanner2023.gif)
<img width="450" height="270" src="https://cdn.discordapp.com/attachments/1015195575693627442/1081877631068295178/DaggerwinServerBanner2023.gif"> # Daggerbot-TS Description
<h1 align="center">Daggerbot-TS Description</h1> This is 1st generation bot that is a TypeScript-based Daggerbot converted from JavaScript at (now archived and privated) ~~[SpaceManBuzz/DaggerBot-](https://github.com/SpaceManBuzz/DaggerBot-)~~
<p align="center">
This is a 1st generation bot that is a TypeScript-based Daggerbot converted from JavaScript at <s><a href="https://github.com/SpaceManBuzz/DaggerBot-">SpaceManBuzz/DaggerBot-</a></s> (now archived and privated)
</p>
</p>

View File

@ -25,21 +25,22 @@
"node": ">=18.17.0", "node": ">=18.17.0",
"yarn": ">=3.6.1" "yarn": ">=3.6.1"
}, },
"packageManager": "yarn@3.6.2", "packageManager": "yarn@3.6.1",
"dependencies": { "dependencies": {
"@discord-player/extractor": "4.4.1", "@discord-player/extractor": "4.4.1",
"@discordjs/opus": "0.9.0", "@discordjs/opus": "0.9.0",
"@octokit/auth-token": "4.0.0", "@octokit/auth-token": "4.0.0",
"@octokit/rest": "20.0.1", "@octokit/rest": "20.0.1",
"axios": "1.4.0",
"canvas": "2.11.2", "canvas": "2.11.2",
"discord-player": "6.6.2", "discord-player": "6.6.2",
"discord.js": "14.13.0", "discord.js": "14.13.0",
"libsodium-wrappers": "0.7.11", "libsodium-wrappers": "0.7.11",
"moment": "2.29.4", "moment": "2.29.4",
"mongoose": "7.4.4", "mongoose": "7.4.3",
"ms": "2.1.3", "ms": "2.1.3",
"prism-media": "1.3.5", "prism-media": "1.3.5",
"systeminformation": "5.19.1", "systeminformation": "5.18.15",
"typescript": "5.1.6", "typescript": "5.1.6",
"xml-js": "1.6.11", "xml-js": "1.6.11",
"youtube-sr": "4.3.4", "youtube-sr": "4.3.4",
@ -47,6 +48,6 @@
}, },
"devDependencies": { "devDependencies": {
"@types/ms": "0.7.31", "@types/ms": "0.7.31",
"@types/node": "20.5.4" "@types/node": "20.5.1"
} }
} }

View File

@ -1,31 +0,0 @@
import TClient from './client';
import mongoose from 'mongoose';
export default async(client:TClient)=>{
const LogPrefix = '[DATABASE]';
mongoose.set('strictQuery', true);
const connection = mongoose.connection;
connection.openUri(client.tokens.mongodb_uri, {
replicaSet: 'toastyy',
autoIndex: true,
authMechanism: 'SCRAM-SHA-256',
authSource: 'admin',
serverSelectionTimeoutMS: 15000,
waitQueueTimeoutMS: 50000,
socketTimeoutMS: 30000,
tls: false,
family: 4
});
connection
.on('connecting', ()=>console.log(client.logTime(), `${LogPrefix} Establishing connection to MongoDB`))
.on('connected', ()=>console.log(client.logTime(), `${LogPrefix} Connection to MongoDB has been established`))
.on('disconnecting', ()=>console.log(client.logTime(), `${LogPrefix} Disconnecting from MongoDB`))
.on('disconnected', ()=>console.log(client.logTime(), `${LogPrefix} Disconnected from MongoDB`))
.on('close', ()=>console.log(client.logTime(), `${LogPrefix} MongoDB has closed the connection`))
.on('reconnected', ()=>console.log(client.logTime(), `${LogPrefix} Re-establishing a connection to MongoDB`))
.on('all', ()=>console.log(client.logTime(), `${LogPrefix} Successfully established a connection to all members`))
.on('fullsetup', ()=>console.log(client.logTime(), `${LogPrefix} Successfully established a connection to Primary server & atleast one member`))
.on('error', ((err:mongoose.Error)=>console.error(client.logTime(), `${LogPrefix} Encountered an error in MongoDB: ${err.message}`)));
}

View File

@ -5,6 +5,7 @@ import {FSPlayer, FSData, FSCareerSavegame, TServer} from './typings/interfaces'
export default async(client:TClient, Channel:string, Message:string, Server:TServer, ServerName:string)=>{ export default async(client:TClient, Channel:string, Message:string, Server:TServer, ServerName:string)=>{
let MPLoopPrefix = '[MPLoop] '; let MPLoopPrefix = '[MPLoop] ';
//let httpRegex = /^(https?)(\:\/\/)/;
let isServerOnline = false; let isServerOnline = false;
let playerData:Array<string> = []; let playerData:Array<string> = [];
let noContentImage = 'https://cdn.discordapp.com/attachments/1118960531135541318/1140906691236479036/68efx1.png'; let noContentImage = 'https://cdn.discordapp.com/attachments/1118960531135541318/1140906691236479036/68efx1.png';
@ -12,6 +13,9 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
const serverErrorEmbed = new client.embed().setColor(client.config.embedColorRed).setTitle('Host did not respond back in time'); const serverErrorEmbed = new client.embed().setColor(client.config.embedColorRed).setTitle('Host did not respond back in time');
const genericEmbed = new client.embed(); const genericEmbed = new client.embed();
// Log bot uptime for the sake of debugging.
//(client.channels.resolve('1091300529696673792') as Discord.TextChannel).send(client.formatTime(client.uptime, 2, {longNames: true, commas: true}));
const decoPlayer = (player:FSPlayer)=>{ const decoPlayer = (player:FSPlayer)=>{
let decorator = player.isAdmin ? ':detective:' : ''; let decorator = player.isAdmin ? ':detective:' : '';
decorator += player.name.includes('Toast') ? '<:toastv2:1132681026662056079>' : ''; decorator += player.name.includes('Toast') ? '<:toastv2:1132681026662056079>' : '';
@ -31,7 +35,7 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
} }
// Truncate unnecessary parts of the name for the serverLog embed // Truncate unnecessary parts of the name for the serverLog embed
client.MPServerCache[ServerName].name = hitDSS.server.name === 'Official Daggerwin Game Server' ? 'Daggerwin' : hitDSS.server.name === 'undefined' ? 'undefined' : client.MPServerCache[ServerName].name; client.MPServerCache[ServerName].name = hitDSS.server.name === 'Official Daggerwin Game Server' ? 'Daggerwin' : hitDSS.server.name === '! ! IRTGaming | Toast Test' ? 'Toast' : client.MPServerCache[ServerName].name;
//Second server name is unknown, will come back and update this later. //Second server name is unknown, will come back and update this later.
//Timescale formatting //Timescale formatting
@ -53,7 +57,7 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
const playersInCache = client.MPServerCache[ServerName].players; const playersInCache = client.MPServerCache[ServerName].players;
if (!playersOnServer ?? playersOnServer === undefined) return new Error('[MPLoop] Empty array, ignoring...'); // For the love of god, stop throwing errors everytime. if (!playersOnServer ?? playersOnServer === undefined) return new Error('[MPLoop] Empty array, ignoring...'); // For the love of god, stop throwing errors everytime.
playersOnServer.forEach(player=>playerData.push(`**${player.name}${decoPlayer(player)}**\nFarming for ${client.formatPlayerUptime(player.uptime)}`)); playersOnServer.forEach(player=>playerData.push(`**${player.name}${decoPlayer(player)}**\nFarming for ${client.formatPlayerUptime(player.uptime)}`));
// Player leaving // Player leaving
for (const player of playersInCache.filter(x=>!playersOnServer.some(y=>y.name === x.name))){ for (const player of playersInCache.filter(x=>!playersOnServer.some(y=>y.name === x.name))){
if (player.uptime > 0) serverLog.send({embeds:[playerLogEmbed(player,false)]}); if (player.uptime > 0) serverLog.send({embeds:[playerLogEmbed(player,false)]});
@ -62,8 +66,6 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
if (!playersInCache.length && client.uptime > 32010) playerObject = playersOnServer; if (!playersInCache.length && client.uptime > 32010) playerObject = playersOnServer;
if (playerObject) for (const player of playerObject) serverLog.send({embeds:[playerLogEmbed(player,true)]}); if (playerObject) for (const player of playerObject) serverLog.send({embeds:[playerLogEmbed(player,true)]});
else if (playersInCache.length) playerObject = playersOnServer.filter(x=>!playersInCache.some(y=>y.name === x.name)); else if (playersInCache.length) playerObject = playersOnServer.filter(x=>!playersInCache.some(y=>y.name === x.name));
if (client.MPServerCache[ServerName].name === null) return;
const Database:Array<number> = JSON.parse(readFileSync(`src/database/${client.MPServerCache[ServerName].name}PlayerData.json`,{encoding:'utf8',flag:'r+'})); const Database:Array<number> = JSON.parse(readFileSync(`src/database/${client.MPServerCache[ServerName].name}PlayerData.json`,{encoding:'utf8',flag:'r+'}));
Database.push(hitDSS.slots?.used); Database.push(hitDSS.slots?.used);
writeFileSync(`src/database/${client.MPServerCache[ServerName].name}PlayerData.json`, JSON.stringify(Database)); writeFileSync(`src/database/${client.MPServerCache[ServerName].name}PlayerData.json`, JSON.stringify(Database));
@ -88,7 +90,7 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
} }
} catch(err) { } catch(err) {
msg.edit({content: null, embeds: [new client.embed().setColor(client.config.embedColorRed).setTitle('Host did not respond back in time')]}); msg.edit({content: null, embeds: [new client.embed().setColor(client.config.embedColorRed).setTitle('Host did not respond back in time')]});
console.log(client.logTime(), `Failed to make a request for ${ServerName}`) throw new Error(`Failed to make a request for ${client.MPServerCache[ServerName].name}`, {cause: err.cause})
} }
} }
HITALL(); HITALL();

View File

@ -1,5 +1,7 @@
import Discord, {Client, WebhookClient, GatewayIntentBits, Partials} from 'discord.js'; import Discord, {Client, WebhookClient, GatewayIntentBits, Partials} from 'discord.js';
import {readFileSync, readdirSync} from 'node:fs'; import {readFileSync, readdirSync} from 'node:fs';
import {exec} from 'node:child_process';
import mongoose from 'mongoose';
import {formatTimeOpt, Tokens, Config, repeatedMessages, type MPServerCache} from './typings/interfaces'; import {formatTimeOpt, Tokens, Config, repeatedMessages, type MPServerCache} from './typings/interfaces';
import bannedWords from './models/bannedWords.js'; import bannedWords from './models/bannedWords.js';
import userLevels from './models/userLevels.js'; import userLevels from './models/userLevels.js';
@ -8,18 +10,18 @@ import punishments from './models/punishments.js';
import tags from './models/tagSystem.js'; import tags from './models/tagSystem.js';
import bonkCount from './models/bonkCount.js'; import bonkCount from './models/bonkCount.js';
import MPServer from './models/MPServer.js'; import MPServer from './models/MPServer.js';
import DatabaseServer from './DatabaseServer.js';
import xjs from 'xml-js'; import xjs from 'xml-js';
import axios from 'axios';
import moment from 'moment'; import moment from 'moment';
const tokens = JSON.parse(readFileSync('src/tokens.json', 'utf8')); const tokens = JSON.parse(readFileSync('src/tokens.json', {encoding:'utf8'}));
// Import assertion warning workaround yes // Import assertion warning workaround yes
let importconfig:Config let importconfig:Config
try{ try{
importconfig = JSON.parse(readFileSync('src/DB-Beta.config.json', 'utf8')); importconfig = JSON.parse(readFileSync('src/DB-Beta.config.json', {encoding:'utf8'}));
console.log('Using development config :: Daggerbot Beta') console.log('Using development config :: Daggerbot Beta')
} catch(e){ } catch(e){
importconfig = JSON.parse(readFileSync('src/config.json', 'utf8')) importconfig = JSON.parse(readFileSync('src/config.json', {encoding:'utf8'}))
console.log('Using production config') console.log('Using production config')
} }
@ -36,6 +38,7 @@ export default class TClient extends Client {
attachmentBuilder: any; attachmentBuilder: any;
moment: typeof moment; moment: typeof moment;
xjs: typeof xjs; xjs: typeof xjs;
axios: typeof axios;
ms: any; ms: any;
userLevels: userLevels; userLevels: userLevels;
punishments: punishments; punishments: punishments;
@ -55,7 +58,7 @@ export default class TClient extends Client {
GatewayIntentBits.GuildModeration, GatewayIntentBits.GuildInvites, GatewayIntentBits.GuildModeration, GatewayIntentBits.GuildInvites,
GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildPresences,
GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.DirectMessages GatewayIntentBits.GuildVoiceStates
], partials: [ ], partials: [
Partials.Channel, Partials.Reaction, Partials.Message Partials.Channel, Partials.Reaction, Partials.Message
], allowedMentions: {users:[],roles:[]} ], allowedMentions: {users:[],roles:[]}
@ -75,6 +78,7 @@ export default class TClient extends Client {
this.attachmentBuilder = Discord.AttachmentBuilder; this.attachmentBuilder = Discord.AttachmentBuilder;
this.moment = moment; this.moment = moment;
this.xjs = xjs; this.xjs = xjs;
this.axios = axios;
this.ms = import('ms').then(i=>i); this.ms = import('ms').then(i=>i);
this.userLevels = new userLevels(this); this.userLevels = new userLevels(this);
this.bonkCount = new bonkCount(this); this.bonkCount = new bonkCount(this);
@ -90,7 +94,18 @@ export default class TClient extends Client {
} }
async init(){ async init(){
console.time('Startup'); console.time('Startup');
await DatabaseServer(this); mongoose.set('strictQuery', true);
await mongoose.connect(this.tokens.mongodb_uri, {
replicaSet: 'toastyy',
autoIndex: true,
authMechanism: 'DEFAULT',
authSource: 'admin',
serverSelectionTimeoutMS: 15000,
waitQueueTimeoutMS: 50000,
socketTimeoutMS: 30000,
tls: false,
family: 4
}).then(()=>console.log(this.logTime(), 'Successfully connected to MongoDB')).catch(()=>{throw new Error('Failed to connect to MongoDB'); exec('pm2 stop Daggerbot', {windowsHide:true})})
this.login(this.tokens.main); this.login(this.tokens.main);
for await (const file of readdirSync('dist/events')){ for await (const file of readdirSync('dist/events')){
const eventFile = await import(`./events/${file}`); const eventFile = await import(`./events/${file}`);
@ -178,39 +193,28 @@ export default class TClient extends Client {
let Data:any; let Data:any;
try { try {
await fetch(`https://www.youtube.com/feeds/videos.xml?channel_id=${YTChannelID}`, {signal: AbortSignal.timeout(6000),headers:{'User-Agent':`Daggerbot - Notification/fetch`}}).then(async xml=>Data = this.xjs.xml2js(await xml.text(), {compact: true})) await this.axios.get(`https://www.youtube.com/feeds/videos.xml?channel_id=${YTChannelID}`, {timeout: 5000}).then(xml=>Data = this.xjs.xml2js(xml.data, {compact: true}))
} catch(err){ } catch(err){
console.log(this.logTime(), `${YTChannelName} YT fail`) console.log(this.logTime(), `${YTChannelName} YT fail`)
} }
if (!Data) return; if (!Data) return;
if (!this.YTCache[YTChannelID]) return this.YTCache[YTChannelID] = Data.feed.entry[0]['yt:videoId']._text; if (this.YTCache[YTChannelID] === undefined){
this.YTCache[YTChannelID] = Data.feed.entry[0]['yt:videoId']._text;
return;
}
if (Data.feed.entry[1]['yt:videoId']._text === this.YTCache[YTChannelID]){ if (Data.feed.entry[1]['yt:videoId']._text === this.YTCache[YTChannelID]){
this.YTCache[YTChannelID] = Data.feed.entry[0]['yt:videoId']._text; this.YTCache[YTChannelID] = Data.feed.entry[0]['yt:videoId']._text;
(this.channels.resolve(DCChannelID) as Discord.TextChannel).send(`**${YTChannelName}** just uploaded a video!\n${Data.feed.entry[0].link._attributes.href}`) (this.channels.resolve(DCChannelID) as Discord.TextChannel).send(`**${YTChannelName}** just uploaded a video!\n${Data.feed.entry[0].link._attributes.href}`)
} }
} }
// Bytes conversion
formatBytes(bytes:number, decimals:number = 2) { formatBytes(bytes:number, decimals:number = 2) {
if (bytes === 0) return '0 Bytes'; if (bytes === 0) return '0 Bytes';
const k = 1024; const k = 1024;
const i = Math.floor(Math.log(bytes) / Math.log(k)); const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(decimals < 0 ? 0 : decimals)) + ' ' + ['Bytes', 'KB', 'MB', 'GB'][i]; return parseFloat((bytes / Math.pow(k, i)).toFixed(decimals < 0 ? 0 : decimals)) + ' ' + ['Bytes', 'KB', 'MB', 'GB'][i];
} };
removeUsername = (text: string)=>{
let matchesLeft = true;
const dirSlash = process.platform === 'linux' ? '\/' : '\\';
const array = text.split(dirSlash);
while (matchesLeft){
let usersIndex = array.indexOf(process.platform === 'linux' ? 'home' : 'Users');
if (usersIndex<1) matchesLeft = false;
else {
let usernameIndex = usersIndex+1;
if(array[usernameIndex].length == 0) usernameIndex += 1;
array[usernameIndex] = '・'.repeat(array[usernameIndex].length);
array[usersIndex] = process.platform === 'linux' ? 'ho\u200bme' : 'Us\u200bers';
}
} return array.join(dirSlash);
}
} }
export class WClient extends WebhookClient { export class WClient extends WebhookClient {

View File

@ -5,6 +5,20 @@ import {exec} from 'node:child_process';
import fs from 'node:fs'; import fs from 'node:fs';
import util from 'node:util'; import util from 'node:util';
import TClient from '../client.js'; import TClient from '../client.js';
const removeUsername = (text: string)=>{
let matchesLeft = true;
const array = text.split('\\');
while (matchesLeft){
let usersIndex = array.indexOf('Users');
if (usersIndex<1) matchesLeft = false;
else {
let usernameIndex = usersIndex+1;
if(array[usernameIndex].length == 0) usernameIndex += 1;
array[usernameIndex] = '*'.repeat(array[usernameIndex].length);
array[usersIndex] = 'Us\u200bers';
}
} return array.join('\\');
};
export default { export default {
run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>) { run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>) {
if (!client.config.whitelist.includes(interaction.user.id)) return client.youNeedRole(interaction, 'bottech'); if (!client.config.whitelist.includes(interaction.user.id)) return client.youNeedRole(interaction, 'bottech');
@ -26,7 +40,7 @@ export default {
const filter = (x:any)=>x.content === 'stack' && x.author.id === interaction.user.id const filter = (x:any)=>x.content === 'stack' && x.author.id === interaction.user.id
const messagecollector = (interaction.channel as Discord.TextChannel).createMessageCollector({filter, max: 1, time: 60000}); const messagecollector = (interaction.channel as Discord.TextChannel).createMessageCollector({filter, max: 1, time: 60000});
messagecollector.on('collect', collected=>{ messagecollector.on('collect', collected=>{
collected.reply({content: `\`\`\`\n${client.removeUsername(err.stack)}\n\`\`\``, allowedMentions: {repliedUser: false}}); collected.reply({content: `\`\`\`\n${removeUsername(err.stack)}\n\`\`\``, allowedMentions: {repliedUser: false}});
}); });
}); });
} }
@ -39,7 +53,7 @@ export default {
].forEach(x=>output = output.replace(new RegExp(x as string,'g'),':noblank: No token?')); ].forEach(x=>output = output.replace(new RegExp(x as string,'g'),':noblank: No token?'));
const embed = new client.embed().setColor(client.config.embedColor).setTitle('__Eval__').addFields( const embed = new client.embed().setColor(client.config.embedColor).setTitle('__Eval__').addFields(
{name: 'Input', value: `\`\`\`js\n${code.slice(0,1010)}\n\`\`\``}, {name: 'Input', value: `\`\`\`js\n${code.slice(0,1010)}\n\`\`\``},
{name: 'Output', value: `\`\`\`${client.removeUsername(output).slice(0,1016)}\n\`\`\``} {name: 'Output', value: `\`\`\`${removeUsername(output).slice(0,1016)}\n\`\`\``}
); );
interaction.reply({embeds: [embed]}).catch(()=>(interaction.channel as Discord.TextChannel).send({embeds: [embed]})); interaction.reply({embeds: [embed]}).catch(()=>(interaction.channel as Discord.TextChannel).send({embeds: [embed]}));
}, },
@ -62,14 +76,13 @@ export default {
} }
}; };
exec('git pull',{windowsHide:true},(err:Error,stdout)=>{ exec('git pull',{windowsHide:true},(err:Error,stdout)=>{
if (err) clarkson.edit(`\`\`\`${client.removeUsername(err.message)}\`\`\``) if (err) clarkson.edit(`\`\`\`${removeUsername(err.message)}\`\`\``)
else if (stdout.includes('Already up to date')) clarkson.edit('I am already up to date with the upstream repository.') else if (stdout.includes('Already up to date')) clarkson.edit('I am already up to date with the upstream repository.')
else clarkson.edit('Compiling TypeScript files...').then(()=>exec('yarn tsc', {windowsHide:true}, (err:Error)=>{ else clarkson.edit('Compiling TypeScript files...').then(()=>exec('yarn tsc', {windowsHide:true}, (err:Error)=>{
if (err) clarkson.edit(`\`\`\`${client.removeUsername(err.message)}\`\`\``) if (err) clarkson.edit(`\`\`\`${removeUsername(err.message)}\`\`\``)
if (interaction.options.getBoolean('restart')) clarkson.edit(`[Commit:](<${github.fetchCommit.url}>) **${github.fetchCommit.msg}**\nCommit author: **${github.fetchCommit.author}**\n\n__Commit changes__\nTotal: **${github.fetchChanges.total}**\nAdditions: **${github.fetchChanges.addition}**\nDeletions: **${github.fetchChanges.deletion}**\n\nSuccessfully compiled TypeScript files into JavaScript!\nUptime before restarting: **${client.formatTime(client.uptime, 3, {commas: true, longNames: true})}**`).then(()=>exec('pm2 restart Daggerbot', {windowsHide:true})); else clarkson.edit(`[Commit:](<${github.fetchCommit.url}>) **${github.fetchCommit.msg}**\nCommit author: **${github.fetchCommit.author}**\n\n__Commit changes__\nTotal: **${github.fetchChanges.total}**\nAdditions: **${github.fetchChanges.addition}**\nDeletions: **${github.fetchChanges.deletion}**\n\nSuccessfully compiled TypeScript files into JavaScript!\nUptime before restarting: **${client.formatTime(client.uptime as number, 3, {commas: true, longNames: true})}**`).then(()=>exec('pm2 restart Daggerbot', {windowsHide:true}))
else clarkson.edit(`[Commit:](<${github.fetchCommit.url}>) **${github.fetchCommit.msg}**\nCommit author: **${github.fetchCommit.author}**\n\n__Commit changes__\nTotal: **${github.fetchChanges.total}**\nAdditions: **${github.fetchChanges.addition}**\nDeletions: **${github.fetchChanges.deletion}**\n\nSuccessfully compiled TypeScript files into JavaScript!`)
})) }))
}) });
}, },
presence: ()=>{ presence: ()=>{
function convertType(Type?: number){ function convertType(Type?: number){
@ -78,7 +91,7 @@ export default {
case 1: return 'Streaming'; case 1: return 'Streaming';
case 2: return 'Listening to'; case 2: return 'Listening to';
case 3: return 'Watching'; case 3: return 'Watching';
case 4: return 'Custom Status'; case 4: return 'Custom Status'; // Will be enabled once PR #9743 on D.JS repo merges in.
case 5: return 'Competing in'; case 5: return 'Competing in';
} }
}; };
@ -102,7 +115,7 @@ export default {
}, },
statsgraph: ()=>{ statsgraph: ()=>{
client.statsGraph = -(interaction.options.getInteger('number', true)); client.statsGraph = -(interaction.options.getInteger('number', true));
interaction.reply(`Successfully set to \`${client.statsGraph}\`\n*Total data points: **${JSON.parse(fs.readFileSync(`src/database/${interaction.options.getString('server')}PlayerData.json`, {encoding: 'utf8'})).length.toLocaleString()}***`) interaction.reply(`Successfully set to \`${client.statsGraph}\`\n*Total data points: **${JSON.parse(fs.readFileSync('src/database/MPPlayerData.json', {encoding: 'utf8'})).length.toLocaleString()}***`)
}, },
logs: ()=>{ logs: ()=>{
interaction.deferReply(); interaction.deferReply();
@ -111,15 +124,15 @@ export default {
restart: async()=>{ restart: async()=>{
const i = await interaction.reply({content: 'Compiling TypeScript files...', fetchReply: true}); const i = await interaction.reply({content: 'Compiling TypeScript files...', fetchReply: true});
exec('yarn tsc',{windowsHide:true},(err:Error)=>{ exec('yarn tsc',{windowsHide:true},(err:Error)=>{
if (err) i.edit(`\`\`\`${client.removeUsername(err.message)}\`\`\``) if (err) i.edit(`\`\`\`${removeUsername(err.message)}\`\`\``)
else i.edit(`Successfully compiled TypeScript files into JavaScript!\nUptime before restarting: **${client.formatTime(client.uptime, 3, {commas: true, longNames: true})}**`).then(()=>exec('pm2 restart Daggerbot', {windowsHide:true})) else i.edit(`Successfully compiled TypeScript files into JavaScript!\nUptime before restarting: **${client.formatTime(client.uptime as number, 3, {commas: true, longNames: true})}**`).then(()=>exec('pm2 restart Daggerbot', {windowsHide:true}))
}) })
}, },
file: ()=>interaction.reply({files:[`./src/database/${interaction.options.getString('name')}.json`]}).catch(()=>'Filesize is too large, upload cancelled.'), file: ()=>interaction.reply({files:[`./src/database/${interaction.options.getString('name')}.json`]}).catch(()=>'Filesize is too large, upload cancelled.'),
wake_device: async()=>{ wake_device: async()=>{
const i = await interaction.reply({content: 'Spawning a task...', fetchReply: true}); const i = await interaction.reply({content: 'Spawning a task...', fetchReply: true});
exec(`cd "../../Desktop/System Tools/wakemeonlan" && WakeMeOnLan.exe /wakeup ${interaction.options.getString('name')}`, {windowsHide:true}, (err:Error)=>{ exec(`cd "../../Desktop/System Tools/wakemeonlan" && WakeMeOnLan.exe /wakeup ${interaction.options.getString('name',true)}`, {windowsHide:true}, (err:Error)=>{
if (err) i.edit(client.removeUsername(err.message)) if (err) i.edit(removeUsername(err.message))
else i.edit('Your device should be awake by now!\n||Don\'t blame me if it isn\'t on.||') else i.edit('Your device should be awake by now!\n||Don\'t blame me if it isn\'t on.||')
}) })
} }
@ -143,12 +156,7 @@ export default {
.setDescription('Restart the bot for technical reasons')) .setDescription('Restart the bot for technical reasons'))
.addSubcommand(x=>x .addSubcommand(x=>x
.setName('update') .setName('update')
.setDescription('Pull from repository and restart') .setDescription('Pull from repository and restart'))
.addBooleanOption(x=>x
.setName('restart')
.setDescription('Restart the bot after pulling from repository')
.setRequired(true)
))
.addSubcommand(x=>x .addSubcommand(x=>x
.setName('wake_device') .setName('wake_device')
.setDescription('Remotely wake up a device in the same network as the bot') .setDescription('Remotely wake up a device in the same network as the bot')
@ -159,10 +167,6 @@ export default {
.addSubcommand(x=>x .addSubcommand(x=>x
.setName('statsgraph') .setName('statsgraph')
.setDescription('Edit the number of data points to pull') .setDescription('Edit the number of data points to pull')
.addStringOption(x=>x
.setName('server')
.setDescription('Server name')
.setRequired(true))
.addIntegerOption(x=>x .addIntegerOption(x=>x
.setName('number') .setName('number')
.setDescription('Number of data points to pull') .setDescription('Number of data points to pull')

View File

@ -3,7 +3,7 @@ import TClient from '../client.js';
import path from 'node:path'; import path from 'node:path';
import canvas from 'canvas'; import canvas from 'canvas';
import {readFileSync} from 'node:fs'; import {readFileSync} from 'node:fs';
import {FSData} from 'src/typings/interfaces.js'; import {FSData, TServer} from 'src/typings/interfaces.js';
const serverChoices = [ const serverChoices = [
{name: 'Main Server', value: 'mainServer'}, {name: 'Main Server', value: 'mainServer'},
@ -13,7 +13,7 @@ const serverChoices = [
export default { export default {
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){ async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
if (client.uptime < 30000) return interaction.reply('I have just restarted, please wait for MPLoop to finish initializing.') if (client.uptime < 30000) return interaction.reply('I have just restarted, please wait for MPLoop to finish initializing.')
const serverSelector = interaction.options.getString('server'); const serverSelector = interaction.options.getString('server', true);
if (interaction.channelId === '468835769092669461' && !client.isStaff(interaction.member) && ['status', 'players'].includes(interaction.options.getSubcommand())) return interaction.reply('Please use <#739084625862852715> for `/mp status/players` commands to prevent clutter in this channel.').then(()=>setTimeout(()=>interaction.deleteReply(), 6000)); if (interaction.channelId === '468835769092669461' && !client.isStaff(interaction.member) && ['status', 'players'].includes(interaction.options.getSubcommand())) return interaction.reply('Please use <#739084625862852715> for `/mp status/players` commands to prevent clutter in this channel.').then(()=>setTimeout(()=>interaction.deleteReply(), 6000));
const database = await client.MPServer._content.findById(interaction.guildId); const database = await client.MPServer._content.findById(interaction.guildId);
@ -188,7 +188,7 @@ export default {
'Please see <#543494084363288637> for additional information.' 'Please see <#543494084363288637> for additional information.'
].join('\n'))]}); ].join('\n'))]});
}, },
/* url: async()=>{ url: async()=>{
if (client.config.mainServer.id == interaction.guildId) { if (client.config.mainServer.id == interaction.guildId) {
if (!interaction.member.roles.cache.has(client.config.mainServer.roles.mpmanager) && !interaction.member.roles.cache.has(client.config.mainServer.roles.bottech) && !interaction.member.roles.cache.has(client.config.mainServer.roles.admin)) return client.youNeedRole(interaction, 'mpmanager'); if (!interaction.member.roles.cache.has(client.config.mainServer.roles.mpmanager) && !interaction.member.roles.cache.has(client.config.mainServer.roles.bottech) && !interaction.member.roles.cache.has(client.config.mainServer.roles.admin)) return client.youNeedRole(interaction, 'mpmanager');
} }
@ -232,13 +232,12 @@ export default {
} }
}, },
maintenance: ()=>{ maintenance: ()=>{
if (client.config.mainServer.id === interaction.guildId) { if (client.config.mainServer.id == interaction.guildId) {
if (!interaction.member.roles.cache.has(client.config.mainServer.roles.mpmanager) && !interaction.member.roles.cache.has(client.config.mainServer.roles.bottech) && !interaction.member.roles.cache.has(client.config.mainServer.roles.admin)) return client.youNeedRole(interaction, 'mpmanager'); if (!interaction.member.roles.cache.has(client.config.mainServer.roles.mpmanager) && !interaction.member.roles.cache.has(client.config.mainServer.roles.bottech) && !interaction.member.roles.cache.has(client.config.mainServer.roles.admin)) return client.youNeedRole(interaction, 'mpmanager');
} }
const maintenanceMessage = interaction.options.getString('message'); const maintenanceMessage = interaction.options.getString('message');
const activePlayersChannel = '739084625862852715'; const activePlayersChannel = '739084625862852715';
const channel = (client.channels.cache.get(activePlayersChannel) as Discord.TextChannel); const channel = (client.channels.cache.get(activePlayersChannel) as Discord.TextChannel);
console.log(channel.permissionsFor(interaction.guildId).has('SendMessages'));
if (channel.permissionOverwrites.cache.get(interaction.guildId).deny.has('SendMessages')) { if (channel.permissionOverwrites.cache.get(interaction.guildId).deny.has('SendMessages')) {
channel.permissionOverwrites.edit(interaction.guildId, {SendMessages: true}, {type: 0, reason: `Unlocked by ${interaction.member.displayName}`}); channel.permissionOverwrites.edit(interaction.guildId, {SendMessages: true}, {type: 0, reason: `Unlocked by ${interaction.member.displayName}`});
channel.send({embeds: [new client.embed().setColor(client.config.embedColor).setAuthor({name: interaction.member.displayName, iconURL: interaction.member.displayAvatarURL({size:1024})}).setTitle('🔓 Channel unlocked').setDescription(`**Reason:**\n${maintenanceMessage}`).setTimestamp()]}); channel.send({embeds: [new client.embed().setColor(client.config.embedColor).setAuthor({name: interaction.member.displayName, iconURL: interaction.member.displayAvatarURL({size:1024})}).setTitle('🔓 Channel unlocked').setDescription(`**Reason:**\n${maintenanceMessage}`).setTimestamp()]});
@ -248,7 +247,7 @@ export default {
channel.send({embeds: [new client.embed().setColor(client.config.embedColor).setAuthor({name: interaction.member.displayName, iconURL: interaction.member.displayAvatarURL({size:1024})}).setTitle('🔒 Channel locked').setDescription(`**Reason:**\n${maintenanceMessage}`).setTimestamp()]}); channel.send({embeds: [new client.embed().setColor(client.config.embedColor).setAuthor({name: interaction.member.displayName, iconURL: interaction.member.displayAvatarURL({size:1024})}).setTitle('🔒 Channel locked').setDescription(`**Reason:**\n${maintenanceMessage}`).setTimestamp()]});
interaction.reply({content: `<#${activePlayersChannel}> has been locked!`, ephemeral: true}); interaction.reply({content: `<#${activePlayersChannel}> has been locked!`, ephemeral: true});
} }
} */ }
})[interaction.options.getSubcommand()](); })[interaction.options.getSubcommand()]();
}, },
data: new Discord.SlashCommandBuilder() data: new Discord.SlashCommandBuilder()
@ -277,7 +276,10 @@ export default {
.setName('server') .setName('server')
.setDescription('The server to update') .setDescription('The server to update')
.setRequired(true) .setRequired(true)
.setChoices(serverChoices[0])) .setChoices(
{name: 'Main Server', value: 'mainServer'},
{name: 'Second Server', value: 'secondServer'}
))
.addStringOption(x=>x .addStringOption(x=>x
.setName('address') .setName('address')
.setDescription('The URL to the dedicated-server-stats.json file') .setDescription('The URL to the dedicated-server-stats.json file')
@ -290,11 +292,10 @@ export default {
.setDescription('The server to display information for') .setDescription('The server to display information for')
.setRequired(true) .setRequired(true)
.setChoices(serverChoices[0]))) .setChoices(serverChoices[0])))
/* .addSubcommand(x=>x .addSubcommand(x=>x
.setName('maintenance') .setName('maintenance')
.setDescription('Toggle maintenance mode for #mp-active-players') .setDescription('Toggle maintenance mode for #mp-active-players')
.addStringOption(x=>x .addStringOption(x=>x
.setName('message') .setName('message')
.setDescription('The message to display in the channel') .setDescription('The message to display in the channel')))
.setRequired(true))) */
} }

View File

@ -3,8 +3,6 @@ import pkg from 'typescript';
import si from 'systeminformation'; import si from 'systeminformation';
import TClient from '../client.js'; import TClient from '../client.js';
import os from 'node:os'; import os from 'node:os';
import {readFileSync} from 'node:fs';
const packageJson = JSON.parse(readFileSync('package.json', 'utf8'));
export default { export default {
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){ async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
const waitForData = await interaction.reply({content: '<a:sakjdfsajkfhsdjhjfsa:1065342869428252743>', fetchReply:true}) const waitForData = await interaction.reply({content: '<a:sakjdfsajkfhsdjhjfsa:1065342869428252743>', fetchReply:true})
@ -44,15 +42,15 @@ export default {
`**TypeScript:** ${pkg.version}`, `**TypeScript:** ${pkg.version}`,
`**NodeJS:** ${process.version}`, `**NodeJS:** ${process.version}`,
`**DiscordJS:** ${Discord.version}`, `**DiscordJS:** ${Discord.version}`,
`**Yarn:** ${packageJson.packageManager.slice(5)}` `**Axios:** ${client.axios.VERSION}`
].join('\n')}, ].join('\n')},
{name: '> __Host__', value: [ {name: '> __Host__', value: [
`**Operating System:** ${osInfo.distro + ' ' + osInfo.release}`, `**Operating System:** ${osInfo.distro + ' ' + osInfo.release}`,
`**CPU:** ${cpu.manufacturer} ${cpu.brand}`, `**CPU:** ${cpu.manufacturer} ${cpu.brand}`,
`**Memory:** ${client.formatBytes(ram.used)}/${client.formatBytes(ram.total)}`, `**Memory:** ${client.formatBytes(ram.used)}/${client.formatBytes(ram.total)}`,
`**Process:** ${client.formatBytes(process.memoryUsage().heapUsed)}/${client.formatBytes(process.memoryUsage().heapTotal)}`, `**NodeJS:** ${client.formatBytes(process.memoryUsage().heapUsed)}/${client.formatBytes(process.memoryUsage().heapTotal)}`,
`**Load Usage:**\nUser: ${currentLoad.currentLoadUser.toFixed(1)}%\nSystem: ${currentLoad.currentLoadSystem.toFixed(1)}%`, `**Load Usage:**\nUser: ${currentLoad.currentLoadUser.toFixed(1)}%\nSystem: ${currentLoad.currentLoadSystem.toFixed(1)}%`,
`**Uptime:**\nHost: ${client.formatTime((os.uptime()*1000), 2, {longNames: true, commas: true})}\nBot: ${client.formatTime(client.uptime, 2, {commas: true, longNames: true})}` `**Uptime:**\nHost: ${client.formatTime((os.uptime()*1000), 2, {longNames: true, commas: true})}\nBot: ${client.formatTime(client.uptime as number, 2, {commas: true, longNames: true})}`
].join('\n')} ].join('\n')}
); );
waitForData.edit({content:null,embeds:[embed]}).then(x=>x.edit({embeds:[new client.embed(x.embeds[0].data).setFooter({text: `Load time: ${client.formatTime(x.createdTimestamp - interaction.createdTimestamp, 2, {longNames: true, commas: true})}`})]})) waitForData.edit({content:null,embeds:[embed]}).then(x=>x.edit({embeds:[new client.embed(x.embeds[0].data).setFooter({text: `Load time: ${client.formatTime(x.createdTimestamp - interaction.createdTimestamp, 2, {longNames: true, commas: true})}`})]}))

View File

@ -2,9 +2,7 @@ import Discord from 'discord.js';
import TClient from 'src/client'; import TClient from 'src/client';
export default { export default {
async run(client:TClient, message:Discord.Message){ async run(client:TClient, message:Discord.Message){
if (message.author.bot) return; if (message.author.bot || message.channel.type === Discord.ChannelType.DM) return;
if (!message.inGuild()) return (client.channels.resolve(client.config.mainServer.channels.logs) as Discord.TextChannel).send({content: `<:fish_unamused:1083675172407623711> <@${client.config.whitelist[0]}>\n**${message.author.username}** tried to send me a DM, their message is:\`\`\`${message.content}\`\`\``, allowedMentions: {parse: ['users']}});
const msgarr = message.content.toLowerCase().replaceAll(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\n?1234567890]/g, '').split(' '); const msgarr = message.content.toLowerCase().replaceAll(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\n?1234567890]/g, '').split(' ');
let automodded: boolean; let automodded: boolean;
@ -89,8 +87,7 @@ export default {
`Good grief, is it Monday already? Anyways, morning ${PersonnyMcPerson}..`, `This time I can shout! So here we go! 1..2..3\n*inhales*\nMORNING ${PersonnyMcPerson.toUpperCase()}!`, `Good grief, is it Monday already? Anyways, morning ${PersonnyMcPerson}..`, `This time I can shout! So here we go! 1..2..3\n*inhales*\nMORNING ${PersonnyMcPerson.toUpperCase()}!`,
'Gooooood morning to you!', `Good morning to you! You know what else is good? A segue to our sponsor, breakfast!\nGet started with getting out of the bed and have some breakfast!`, 'Gooooood morning to you!', `Good morning to you! You know what else is good? A segue to our sponsor, breakfast!\nGet started with getting out of the bed and have some breakfast!`,
`## Morning ${PersonnyMcPerson}!`, '### Have a wonderful day ahead of you!', `Here, have some pancakes for breakfast, ${PersonnyMcPerson}`, 'Is it Friday yet? This week is getting boring already!', `## Morning ${PersonnyMcPerson}!`, '### Have a wonderful day ahead of you!', `Here, have some pancakes for breakfast, ${PersonnyMcPerson}`, 'Is it Friday yet? This week is getting boring already!',
`You have reached ${client.moment.utc().dayOfYear().toLocaleString('en-US')}th day of the year, also good morning to you as well!`, 'Good morning! Have a cookie to start your day with. :cookie:', `You have reached ${client.moment.utc().dayOfYear().toLocaleString('en-US')}th day of the year. Also good morning to you as well!`, 'Good morning! Have a cookie to start your day with. :cookie:'
'https://tenor.com/view/rambo-family-rambo-rise-and-shine-wake-up-gif-22012440'
], ],
afternoon: [ afternoon: [
`Afternoon ${PersonnyMcPerson}!`, `What a nice day outside, ${PersonnyMcPerson}`, `Good afternoon ${PersonnyMcPerson}`, `Afternoon ${PersonnyMcPerson}!`, `What a nice day outside, ${PersonnyMcPerson}`, `Good afternoon ${PersonnyMcPerson}`,

View File

@ -87,7 +87,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 = JSON.parse(readFileSync('./src/database/dailyMsgs.json', 'utf8')) const dailyMsgs = JSON.parse(readFileSync('./src/database/dailyMsgs.json', {encoding: 'utf8'}))
if (client.config.botSwitches.dailyMsgsBackup && !dailyMsgs.some((x:Array<number>)=>x[0] === formattedDate)){ if (client.config.botSwitches.dailyMsgsBackup && !dailyMsgs.some((x:Array<number>)=>x[0] === formattedDate)){
let total = (await client.userLevels._content.find({})).reduce((a,b)=>a + b.messages, 0); // sum of all users let total = (await client.userLevels._content.find({})).reduce((a,b)=>a + b.messages, 0); // sum of all users
const yesterday = dailyMsgs.find((x:Array<number>)=>x[0] === formattedDate - 1); const yesterday = dailyMsgs.find((x:Array<number>)=>x[0] === formattedDate - 1);

View File

@ -1 +1 @@
require('node:child_process').spawn('yarn node dist/index.js', {stdio: [null,process.stdout,process.stderr,null], windowsHide: true, shell: true}) require('node:child_process').spawn('yarn && yarn node dist/index.js', {stdio: [null,process.stdout,process.stderr,null], windowsHide: true, shell: true})

109
yarn.lock
View File

@ -393,10 +393,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/node@npm:20.5.4": "@types/node@npm:20.5.1":
version: 20.5.4 version: 20.5.1
resolution: "@types/node@npm:20.5.4" resolution: "@types/node@npm:20.5.1"
checksum: 18de76c990e1c298183661cfc7cf16c9384531538c8090cc27bc3cab801e7c46b9f6943591ab0433955dd57961601684cc0fb19ba2deee9609e137c91afd2e25 checksum: 3dbe611cd67afa987102c8558ee70f848949c5dcfee5f60abc073e55c0d7b048e391bf06bb1e0dc052cb7210ca97136ac496cbaf6e89123c989de6bd125fde82
languageName: node languageName: node
linkType: hard linkType: hard
@ -527,6 +527,24 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"asynckit@npm:^0.4.0":
version: 0.4.0
resolution: "asynckit@npm:0.4.0"
checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be
languageName: node
linkType: hard
"axios@npm:1.4.0":
version: 1.4.0
resolution: "axios@npm:1.4.0"
dependencies:
follow-redirects: ^1.15.0
form-data: ^4.0.0
proxy-from-env: ^1.1.0
checksum: 7fb6a4313bae7f45e89d62c70a800913c303df653f19eafec88e56cea2e3821066b8409bc68be1930ecca80e861c52aa787659df0ffec6ad4d451c7816b9386b
languageName: node
linkType: hard
"balanced-match@npm:^1.0.0": "balanced-match@npm:^1.0.0":
version: 1.0.2 version: 1.0.2
resolution: "balanced-match@npm:1.0.2" resolution: "balanced-match@npm:1.0.2"
@ -683,6 +701,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"combined-stream@npm:^1.0.8":
version: 1.0.8
resolution: "combined-stream@npm:1.0.8"
dependencies:
delayed-stream: ~1.0.0
checksum: 49fa4aeb4916567e33ea81d088f6584749fc90c7abec76fd516bf1c5aa5c79f3584b5ba3de6b86d26ddd64bae5329c4c7479343250cfe71c75bb366eae53bb7c
languageName: node
linkType: hard
"concat-map@npm:0.0.1": "concat-map@npm:0.0.1":
version: 0.0.1 version: 0.0.1
resolution: "concat-map@npm:0.0.1" resolution: "concat-map@npm:0.0.1"
@ -737,16 +764,17 @@ __metadata:
"@octokit/auth-token": 4.0.0 "@octokit/auth-token": 4.0.0
"@octokit/rest": 20.0.1 "@octokit/rest": 20.0.1
"@types/ms": 0.7.31 "@types/ms": 0.7.31
"@types/node": 20.5.4 "@types/node": 20.5.1
axios: 1.4.0
canvas: 2.11.2 canvas: 2.11.2
discord-player: 6.6.2 discord-player: 6.6.2
discord.js: 14.13.0 discord.js: 14.13.0
libsodium-wrappers: 0.7.11 libsodium-wrappers: 0.7.11
moment: 2.29.4 moment: 2.29.4
mongoose: 7.4.4 mongoose: 7.4.3
ms: 2.1.3 ms: 2.1.3
prism-media: 1.3.5 prism-media: 1.3.5
systeminformation: 5.19.1 systeminformation: 5.18.15
typescript: 5.1.6 typescript: 5.1.6
xml-js: 1.6.11 xml-js: 1.6.11
youtube-sr: 4.3.4 youtube-sr: 4.3.4
@ -782,6 +810,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"delayed-stream@npm:~1.0.0":
version: 1.0.0
resolution: "delayed-stream@npm:1.0.0"
checksum: 46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020
languageName: node
linkType: hard
"delegates@npm:^1.0.0": "delegates@npm:^1.0.0":
version: 1.0.0 version: 1.0.0
resolution: "delegates@npm:1.0.0" resolution: "delegates@npm:1.0.0"
@ -987,6 +1022,16 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"follow-redirects@npm:^1.15.0":
version: 1.15.2
resolution: "follow-redirects@npm:1.15.2"
peerDependenciesMeta:
debug:
optional: true
checksum: faa66059b66358ba65c234c2f2a37fcec029dc22775f35d9ad6abac56003268baf41e55f9ee645957b32c7d9f62baf1f0b906e68267276f54ec4b4c597c2b190
languageName: node
linkType: hard
"foreground-child@npm:^3.1.0": "foreground-child@npm:^3.1.0":
version: 3.1.1 version: 3.1.1
resolution: "foreground-child@npm:3.1.1" resolution: "foreground-child@npm:3.1.1"
@ -997,6 +1042,17 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"form-data@npm:^4.0.0":
version: 4.0.0
resolution: "form-data@npm:4.0.0"
dependencies:
asynckit: ^0.4.0
combined-stream: ^1.0.8
mime-types: ^2.1.12
checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c
languageName: node
linkType: hard
"formdata-polyfill@npm:^4.0.10": "formdata-polyfill@npm:^4.0.10":
version: 4.0.10 version: 4.0.10
resolution: "formdata-polyfill@npm:4.0.10" resolution: "formdata-polyfill@npm:4.0.10"
@ -1403,6 +1459,22 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"mime-db@npm:1.52.0":
version: 1.52.0
resolution: "mime-db@npm:1.52.0"
checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f
languageName: node
linkType: hard
"mime-types@npm:^2.1.12":
version: 2.1.35
resolution: "mime-types@npm:2.1.35"
dependencies:
mime-db: 1.52.0
checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836
languageName: node
linkType: hard
"mimic-response@npm:^2.0.0": "mimic-response@npm:^2.0.0":
version: 2.1.0 version: 2.1.0
resolution: "mimic-response@npm:2.1.0" resolution: "mimic-response@npm:2.1.0"
@ -1577,9 +1649,9 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"mongoose@npm:7.4.4": "mongoose@npm:7.4.3":
version: 7.4.4 version: 7.4.3
resolution: "mongoose@npm:7.4.4" resolution: "mongoose@npm:7.4.3"
dependencies: dependencies:
bson: ^5.4.0 bson: ^5.4.0
kareem: 2.5.1 kareem: 2.5.1
@ -1588,7 +1660,7 @@ __metadata:
mquery: 5.0.0 mquery: 5.0.0
ms: 2.1.3 ms: 2.1.3
sift: 16.0.1 sift: 16.0.1
checksum: 54d014b4359c669027561a0570adca43c21a3e0fd22435e845d969274954057ee119088fa138e80f7199a49ccb48c516bde57848c468587eea1bfa51f767e224 checksum: e92feec9e739fd429726b6b17ad0d5c05503d2786aa9605548e2b7e999f990a59bdf950e5cd44aa10e3936277410b4880e760e9e503627fae6c16b4901bf9c49
languageName: node languageName: node
linkType: hard linkType: hard
@ -1871,6 +1943,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"proxy-from-env@npm:^1.1.0":
version: 1.1.0
resolution: "proxy-from-env@npm:1.1.0"
checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4
languageName: node
linkType: hard
"punycode@npm:^2.1.1": "punycode@npm:^2.1.1":
version: 2.3.0 version: 2.3.0
resolution: "punycode@npm:2.3.0" resolution: "punycode@npm:2.3.0"
@ -2175,12 +2254,12 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"systeminformation@npm:5.19.1": "systeminformation@npm:5.18.15":
version: 5.19.1 version: 5.18.15
resolution: "systeminformation@npm:5.19.1" resolution: "systeminformation@npm:5.18.15"
bin: bin:
systeminformation: lib/cli.js systeminformation: lib/cli.js
checksum: 0e02fbc1082f29732c69ba464069df6d1efb53385d394ba40d55292ab2cf88b2240095908774535adc9244f369a0f52c7aadb7114dd6895243538b263840c27c checksum: 15555c2c0fac29ca8146153c5b9ad146f5fe5ffe109f0cbc20d2d2b902f8b4d2cc57a1add233edc4914c13f984b96250a51ce351bd570a1ac6ba369ed3caa974
conditions: (os=darwin | os=linux | os=win32 | os=freebsd | os=openbsd | os=netbsd | os=sunos | os=android) conditions: (os=darwin | os=linux | os=win32 | os=freebsd | os=openbsd | os=netbsd | os=sunos | os=android)
languageName: node languageName: node
linkType: hard linkType: hard