rewrote the trust levels

This commit is contained in:
Parker2991
2025-09-12 12:54:08 -05:00
parent d2e2124fbe
commit a76e65b18f
34 changed files with 107 additions and 1343 deletions
-690
View File
@@ -5,20 +5,11 @@
"packages": {
"": {
"dependencies": {
"@tonejs/midi": "^2.0.28",
"axios": "^1.11.0",
"discord.js": "^14.22.1",
"js-yaml": "^4.1.0",
"mariadb": "^3.4.5",
"matrix-js-sdk": "^36.2.0",
"minecraft-data": "^3.98.0",
"minecraft-protocol": "^1.62.0",
"prismarine-chat": "^1.11.0",
"prismarine-chunk": "^1.39.0",
"prismarine-item": "^1.17.0",
"prismarine-registry": "^1.11.0",
"prismarine-world": "^3.6.3",
"request": "^2.88.2",
"undici": "^7.16.0",
"wikipedia": "^2.1.2"
},
@@ -58,15 +49,6 @@
"uuid": "dist/bin/uuid"
}
},
"node_modules/@babel/runtime": {
"version": "7.28.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
"integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
"license": "MIT",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@biomejs/biome": {
"version": "1.9.4",
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.9.4.tgz",
@@ -367,21 +349,6 @@
"url": "https://github.com/discordjs/discord.js?sponsor"
}
},
"node_modules/@matrix-org/matrix-sdk-crypto-wasm": {
"version": "13.0.0",
"resolved": "https://registry.npmjs.org/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-13.0.0.tgz",
"integrity": "sha512-2gtpjnxL42sdJAgkwitpMMI4cw7Gcjf5sW0MXoe+OAlXPlxIzyM+06F5JJ8ENvBeHkuV2RqtFIRrh8i90HLsMw==",
"license": "Apache-2.0",
"engines": {
"node": ">= 18"
}
},
"node_modules/@matrix-org/olm": {
"version": "3.2.15",
"resolved": "https://registry.npmjs.org/@matrix-org/olm/-/olm-3.2.15.tgz",
"integrity": "sha512-S7lOrndAK9/8qOtaTq/WhttJC/o4GAzdfK0MUPpo8ApzsJEC0QjtwrkC3KBXdFP1cD1MXi/mlKR7aaoVMKgs6Q==",
"license": "Apache-2.0"
},
"node_modules/@sapphire/async-queue": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.5.tgz",
@@ -415,28 +382,6 @@
"npm": ">=7.0.0"
}
},
"node_modules/@tonejs/midi": {
"version": "2.0.28",
"resolved": "https://registry.npmjs.org/@tonejs/midi/-/midi-2.0.28.tgz",
"integrity": "sha512-RII6YpInPsOZ5t3Si/20QKpNqB1lZ2OCFJSOzJxz38YdY/3zqDr3uaml4JuCWkdixuPqP1/TBnXzhQ39csyoVg==",
"license": "MIT",
"dependencies": {
"array-flatten": "^3.0.0",
"midi-file": "^1.2.2"
}
},
"node_modules/@types/events": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.3.tgz",
"integrity": "sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g==",
"license": "MIT"
},
"node_modules/@types/geojson": {
"version": "7946.0.16",
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",
"integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==",
"license": "MIT"
},
"node_modules/@types/node": {
"version": "24.3.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.1.tgz",
@@ -464,12 +409,6 @@
"@types/node": "*"
}
},
"node_modules/@types/retry": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz",
"integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==",
"license": "MIT"
},
"node_modules/@types/ws": {
"version": "8.18.1",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
@@ -548,60 +487,18 @@
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/another-json": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/another-json/-/another-json-0.2.0.tgz",
"integrity": "sha512-/Ndrl68UQLhnCdsAzEXLMFuOR546o2qbYRqCglaNHbjXrwG1ayTcdwr3zkSGOGtGXDyR5X9nCFfnyG2AFJIsqg==",
"license": "Apache-2.0"
},
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"license": "Python-2.0"
},
"node_modules/array-flatten": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-3.0.0.tgz",
"integrity": "sha512-zPMVc3ZYlGLNk4mpK1NzP2wg0ml9t7fUgDsayR5Y5rSzxQilzR9FGu/EH2jQOcKSAeAfWeylyW8juy3OkWRvNA==",
"license": "MIT"
},
"node_modules/asn1": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
"integrity": "sha512-6i37w/+EhlWlGUJff3T/Q8u1RGmP5wgbiwYnOnbOqvtrPxT63/sYFyP9RcpxtxGymtfA075IvmOnL7ycNOWl3w==",
"license": "MIT"
},
"node_modules/assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
"license": "MIT",
"engines": {
"node": ">=0.8"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
},
"node_modules/aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==",
"license": "Apache-2.0",
"engines": {
"node": "*"
}
},
"node_modules/aws4": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz",
"integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==",
"license": "MIT"
},
"node_modules/axios": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz",
@@ -613,12 +510,6 @@
"proxy-from-env": "^1.1.0"
}
},
"node_modules/base-x": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-5.0.1.tgz",
"integrity": "sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg==",
"license": "MIT"
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -639,24 +530,6 @@
],
"license": "MIT"
},
"node_modules/bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
"license": "BSD-3-Clause",
"dependencies": {
"tweetnacl": "^0.14.3"
}
},
"node_modules/bs58": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/bs58/-/bs58-6.0.0.tgz",
"integrity": "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==",
"license": "MIT",
"dependencies": {
"base-x": "^5.0.0"
}
},
"node_modules/buffer": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
@@ -721,12 +594,6 @@
"node": ">=4"
}
},
"node_modules/caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==",
"license": "Apache-2.0"
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -745,33 +612,6 @@
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"license": "MIT"
},
"node_modules/content-type": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==",
"license": "MIT"
},
"node_modules/dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==",
"license": "MIT",
"dependencies": {
"assert-plus": "^1.0.0"
},
"engines": {
"node": ">=0.10"
}
},
"node_modules/debug": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
@@ -798,15 +638,6 @@
"node": ">=0.4.0"
}
},
"node_modules/denque": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
"integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.10"
}
},
"node_modules/discontinuous-range": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz",
@@ -872,16 +703,6 @@
"node": ">= 0.4"
}
},
"node_modules/ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==",
"license": "MIT",
"dependencies": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
}
},
"node_modules/ecdsa-sig-formatter": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
@@ -960,21 +781,6 @@
"node": ">=0.8.x"
}
},
"node_modules/extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
"license": "MIT"
},
"node_modules/extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==",
"engines": [
"node >=0.6.0"
],
"license": "MIT"
},
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
@@ -1007,15 +813,6 @@
}
}
},
"node_modules/forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==",
"license": "Apache-2.0",
"engines": {
"node": "*"
}
},
"node_modules/form-data": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
@@ -1078,15 +875,6 @@
"node": ">= 0.4"
}
},
"node_modules/getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==",
"license": "MIT",
"dependencies": {
"assert-plus": "^1.0.0"
}
},
"node_modules/gopd": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
@@ -1099,29 +887,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==",
"license": "ISC",
"engines": {
"node": ">=4"
}
},
"node_modules/har-validator": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
"integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
"deprecated": "this library is no longer supported",
"license": "MIT",
"dependencies": {
"ajv": "^6.12.3",
"har-schema": "^2.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/has-symbols": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
@@ -1161,33 +926,6 @@
"node": ">= 0.4"
}
},
"node_modules/http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==",
"license": "MIT",
"dependencies": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
},
"engines": {
"node": ">=0.8",
"npm": ">=1.3.7"
}
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
@@ -1221,54 +959,12 @@
"url": "https://www.buymeacoffee.com/2tmRKi9"
}
},
"node_modules/is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
"license": "MIT"
},
"node_modules/isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==",
"license": "MIT"
},
"node_modules/js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
},
"bin": {
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==",
"license": "MIT"
},
"node_modules/json-schema": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
"integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
"license": "(AFL-2.1 OR BSD-3-Clause)"
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"license": "MIT"
},
"node_modules/json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
"license": "ISC"
},
"node_modules/jsonwebtoken": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
@@ -1291,21 +987,6 @@
"npm": ">=6"
}
},
"node_modules/jsprim": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
"integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
"license": "MIT",
"dependencies": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.4.0",
"verror": "1.10.0"
},
"engines": {
"node": ">=0.6.0"
}
},
"node_modules/jwa": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz",
@@ -1327,15 +1008,6 @@
"safe-buffer": "^5.0.1"
}
},
"node_modules/jwt-decode": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz",
"integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==",
"license": "MIT",
"engines": {
"node": ">=18"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
@@ -1402,25 +1074,6 @@
"integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==",
"license": "MIT"
},
"node_modules/loglevel": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz",
"integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==",
"license": "MIT",
"engines": {
"node": ">= 0.6.0"
},
"funding": {
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/loglevel"
}
},
"node_modules/lru-cache": {
"version": "10.4.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
"integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
"license": "ISC"
},
"node_modules/macaddress": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.5.3.tgz",
@@ -1433,22 +1086,6 @@
"integrity": "sha512-ThQLOhN86ZkJ7qemtVRGYM+gRgR8GEXNli9H/PMvpnZsE44Xfh3wx9kGJaldg314v85m+bFW6WBMaVHJc/c3zA==",
"license": "MIT"
},
"node_modules/mariadb": {
"version": "3.4.5",
"resolved": "https://registry.npmjs.org/mariadb/-/mariadb-3.4.5.tgz",
"integrity": "sha512-gThTYkhIS5rRqkVr+Y0cIdzr+GRqJ9sA2Q34e0yzmyhMCwyApf3OKAC1jnF23aSlIOqJuyaUFUcj7O1qZslmmQ==",
"license": "LGPL-2.1-or-later",
"dependencies": {
"@types/geojson": "^7946.0.16",
"@types/node": "^24.0.13",
"denque": "^2.1.0",
"iconv-lite": "^0.6.3",
"lru-cache": "^10.4.3"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
@@ -1458,54 +1095,6 @@
"node": ">= 0.4"
}
},
"node_modules/matrix-events-sdk": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz",
"integrity": "sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA==",
"license": "Apache-2.0"
},
"node_modules/matrix-js-sdk": {
"version": "36.2.0",
"resolved": "https://registry.npmjs.org/matrix-js-sdk/-/matrix-js-sdk-36.2.0.tgz",
"integrity": "sha512-pP44qfqLA9tiJjx5YjxBPPkUmNsA2G0nb04ZUTuPbtQFmfK5cEQgIpvoCq69oqU6aulufeYpxJmd9yNffOvF9g==",
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@matrix-org/matrix-sdk-crypto-wasm": "^13.0.0",
"@matrix-org/olm": "3.2.15",
"another-json": "^0.2.0",
"bs58": "^6.0.0",
"content-type": "^1.0.4",
"jwt-decode": "^4.0.0",
"loglevel": "^1.7.1",
"matrix-events-sdk": "0.0.1",
"matrix-widget-api": "^1.10.0",
"oidc-client-ts": "^3.0.1",
"p-retry": "4",
"sdp-transform": "^2.14.1",
"unhomoglyph": "^1.0.6",
"uuid": "11"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/matrix-widget-api": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/matrix-widget-api/-/matrix-widget-api-1.13.1.tgz",
"integrity": "sha512-mkOHUVzaN018TCbObfGOSaMW2GoUxOfcxNNlTVx5/HeMk3OSQPQM0C9oEME5Liiv/dBUoSrEB64V8wF7e/gb1w==",
"license": "Apache-2.0",
"dependencies": {
"@types/events": "^3.0.0",
"events": "^3.2.0"
}
},
"node_modules/midi-file": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/midi-file/-/midi-file-1.2.4.tgz",
"integrity": "sha512-B5SnBC6i2bwJIXTY9MElIydJwAmnKx+r5eJ1jknTLetzLflEl0GWveuBB6ACrQpecSRkOB6fhTx1PwXk2BVxnA==",
"license": "MIT"
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
@@ -1641,46 +1230,6 @@
"asn1": "0.2.3"
}
},
"node_modules/oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
"license": "Apache-2.0",
"engines": {
"node": "*"
}
},
"node_modules/oidc-client-ts": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/oidc-client-ts/-/oidc-client-ts-3.3.0.tgz",
"integrity": "sha512-t13S540ZwFOEZKLYHJwSfITugupW4uYLwuQSSXyKH/wHwZ+7FvgHE7gnNJh1YQIZ1Yd1hKSRjqeXGSUtS0r9JA==",
"license": "Apache-2.0",
"dependencies": {
"jwt-decode": "^4.0.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/p-retry": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz",
"integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==",
"license": "MIT",
"dependencies": {
"@types/retry": "0.12.0",
"retry": "^0.13.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==",
"license": "MIT"
},
"node_modules/prismarine-auth": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.7.0.tgz",
@@ -1729,25 +1278,6 @@
"prismarine-registry": "^1.4.0"
}
},
"node_modules/prismarine-chunk": {
"version": "1.39.0",
"resolved": "https://registry.npmjs.org/prismarine-chunk/-/prismarine-chunk-1.39.0.tgz",
"integrity": "sha512-RJHACPV2T3ABGlj0+q/ZUDBLPcslWTIa12lWyE2jJb/svqpTBx8S/K6VjHxhyJ488L9ZWdEmOAr+CHMZJtwWHw==",
"license": "MIT",
"dependencies": {
"prismarine-biome": "^1.2.0",
"prismarine-block": "^1.14.1",
"prismarine-nbt": "^2.2.1",
"prismarine-registry": "^1.1.0",
"smart-buffer": "^4.1.0",
"uint4": "^0.1.2",
"vec3": "^0.1.3",
"xxhash-wasm": "^0.4.2"
},
"engines": {
"node": ">=14"
}
},
"node_modules/prismarine-item": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/prismarine-item/-/prismarine-item-1.17.0.tgz",
@@ -1788,18 +1318,6 @@
"prismarine-nbt": "^2.0.0"
}
},
"node_modules/prismarine-world": {
"version": "3.6.3",
"resolved": "https://registry.npmjs.org/prismarine-world/-/prismarine-world-3.6.3.tgz",
"integrity": "sha512-zqdqPEYCDHzqi6hglJldEO63bOROXpbZeIdxBmoQq7o04Lf81t016LU6stFHo3E+bmp5+xU74eDFdOvzYNABkA==",
"license": "MIT",
"dependencies": {
"vec3": "^0.1.7"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
@@ -1841,18 +1359,6 @@
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"license": "MIT"
},
"node_modules/psl": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz",
"integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==",
"license": "MIT",
"dependencies": {
"punycode": "^2.3.1"
},
"funding": {
"url": "https://github.com/sponsors/lupomontero"
}
},
"node_modules/punycode": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
@@ -1862,15 +1368,6 @@
"node": ">=6"
}
},
"node_modules/qs": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
"integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.6"
}
},
"node_modules/railroad-diagrams": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz",
@@ -1906,62 +1403,6 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/request": {
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
"integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
"deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
"license": "Apache-2.0",
"dependencies": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.2",
"har-validator": "~5.1.3",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.5.0",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/request/node_modules/form-data": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 0.12"
}
},
"node_modules/request/node_modules/uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
"license": "MIT",
"bin": {
"uuid": "bin/uuid"
}
},
"node_modules/ret": {
"version": "0.1.15",
"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
@@ -1971,15 +1412,6 @@
"node": ">=0.12"
}
},
"node_modules/retry": {
"version": "0.13.1",
"resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
"integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
"license": "MIT",
"engines": {
"node": ">= 4"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@@ -2000,21 +1432,6 @@
],
"license": "MIT"
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"license": "MIT"
},
"node_modules/sdp-transform": {
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.15.0.tgz",
"integrity": "sha512-KrOH82c/W+GYQ0LHqtr3caRpM3ITglq3ljGUIb8LTki7ByacJZ9z+piSGiwZDsRyhQbYBOBJgr2k6X4BZXi3Kw==",
"license": "MIT",
"bin": {
"sdp-verify": "checker.js"
}
},
"node_modules/semver": {
"version": "7.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
@@ -2037,31 +1454,6 @@
"npm": ">= 3.0.0"
}
},
"node_modules/sshpk": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz",
"integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==",
"license": "MIT",
"dependencies": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
},
"bin": {
"sshpk-conv": "bin/sshpk-conv",
"sshpk-sign": "bin/sshpk-sign",
"sshpk-verify": "bin/sshpk-verify"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
@@ -2071,19 +1463,6 @@
"safe-buffer": "~5.2.0"
}
},
"node_modules/tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
"license": "BSD-3-Clause",
"dependencies": {
"psl": "^1.1.28",
"punycode": "^2.1.1"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
@@ -2102,30 +1481,6 @@
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"license": "0BSD"
},
"node_modules/tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
"license": "Apache-2.0",
"dependencies": {
"safe-buffer": "^5.0.1"
},
"engines": {
"node": "*"
}
},
"node_modules/tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==",
"license": "Unlicense"
},
"node_modules/uint4": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/uint4/-/uint4-0.1.2.tgz",
"integrity": "sha512-lhEx78gdTwFWG+mt6cWAZD/R6qrIj0TTBeH5xwyuDJyswLNlGe+KVlUPQ6+mx5Ld332pS0AMUTo9hIly7YsWxQ==",
"license": "MIT"
},
"node_modules/undici": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-7.16.0.tgz",
@@ -2141,12 +1496,6 @@
"integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
"license": "MIT"
},
"node_modules/unhomoglyph": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/unhomoglyph/-/unhomoglyph-1.0.6.tgz",
"integrity": "sha512-7uvcWI3hWshSADBu4JpnyYbTVc7YlhF5GDW/oPD5AxIxl34k4wXR3WDkPnzLxkN32LiTCTKMQLtKVZiwki3zGg==",
"license": "MIT"
},
"node_modules/uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
@@ -2156,19 +1505,6 @@
"punycode": "^2.1.0"
}
},
"node_modules/uuid": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
"integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist/esm/bin/uuid"
}
},
"node_modules/uuid-1345": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/uuid-1345/-/uuid-1345-1.0.2.tgz",
@@ -2178,26 +1514,6 @@
"macaddress": "^0.5.1"
}
},
"node_modules/vec3": {
"version": "0.1.10",
"resolved": "https://registry.npmjs.org/vec3/-/vec3-0.1.10.tgz",
"integrity": "sha512-Sr1U3mYtMqCOonGd3LAN9iqy0qF6C+Gjil92awyK/i2OwiUo9bm7PnLgFpafymun50mOjnDcg4ToTgRssrlTcw==",
"license": "BSD"
},
"node_modules/verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==",
"engines": [
"node >=0.6.0"
],
"license": "MIT",
"dependencies": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
@@ -2248,12 +1564,6 @@
}
}
},
"node_modules/xxhash-wasm": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-0.4.2.tgz",
"integrity": "sha512-/eyHVRJQCirEkSZ1agRSCwriMhwlyUcFkXD5TPVSLP+IPzjsqMVzZwdoczLp1SoQU0R3dxz1RpIK+4YNQbCVOA==",
"license": "MIT"
},
"node_modules/yggdrasil": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/yggdrasil/-/yggdrasil-1.7.0.tgz",
-9
View File
@@ -1,19 +1,10 @@
{
"dependencies": {
"@tonejs/midi": "^2.0.28",
"axios": "^1.11.0",
"discord.js": "^14.22.1",
"js-yaml": "^4.1.0",
"mariadb": "^3.4.5",
"matrix-js-sdk": "^36.2.0",
"minecraft-data": "^3.98.0",
"minecraft-protocol": "^1.62.0",
"prismarine-chat": "^1.11.0",
"prismarine-chunk": "^1.39.0",
"prismarine-item": "^1.17.0",
"prismarine-registry": "^1.11.0",
"prismarine-world": "^3.6.3",
"request": "^2.88.2",
"undici": "^7.16.0",
"wikipedia": "^2.1.2"
},
+1 -1
View File
@@ -84,7 +84,7 @@ class Bot {
});
process.on("uncaughtException", (e) => {
bot.console.warn(`${e.stack}`);
console.warn(`${e.stack}`);
});
});
+1 -1
View File
@@ -32,8 +32,8 @@ function chipmunkmod(message, data, context, bot) {
sender,
contents,
type: "minecraft:chat",
chatType: ["system"],
senderComponent,
chatType: data.chatType
};
} catch (e) {
console.error(e);
+1 -1
View File
@@ -15,8 +15,8 @@ function parseMessage(messageobj, data) {
return {
sender,
contents: match[3],
chatType: "player",
type: "minecraft:chat",
chatType: data.chatType
};
}
} catch (e) {
+1 -1
View File
@@ -31,7 +31,7 @@ function kaboom (message, data) {
if (!sender) return undefined
return { sender, contents, type: 'minecraft:chat', displayName, chatType: "minecraft:player_chat" }
return { sender, contents, type: "minecraft:chat", displayName, chatType: data.chatType }
}
function isSeparatorAt (children, start) {
+1 -1
View File
@@ -27,8 +27,8 @@ function parseMessage(message, data, context) {
sender,
contents,
type: "minecraft:chat",
chatType: "minecraft:player_chat",
senderComponent,
chatType: data.chatType
};
} catch (e) {
console.error(`${e.stack}`);
+2 -2
View File
@@ -1,12 +1,12 @@
class CommandContext {
constructor(name, aliases, description, trustLevel, usages, playerOnly) {
constructor(name, aliases, description, trustLevel, usages, playerChat) {
this.data = {};
this.data.name = name;
this.data.aliases = aliases;
this.data.description = description;
this.data.trustLevel = trustLevel;
this.data.usages = usages;
this.data.playerOnly = playerOnly;
this.data.playerChat = playerChat;
}
}
module.exports = CommandContext;
+2 -4
View File
@@ -3,12 +3,10 @@ const ChatMessage = require("prismarine-chat")("1.20.2");
const stringify = (message) => new ChatMessage(message)?.toString();
class CommandError extends Error {
constructor(message, filename, lineError, useChat) {
super(stringify(message), filename, lineError, useChat);
constructor(message, filename, lineError) {
super(stringify(message), filename, lineError);
this.name = "CommandError";
this._message = message;
return (this._useChat = useChat);
// this._useChat = useChat
}
get message() {
+2 -1
View File
@@ -3,7 +3,8 @@ class CommandSource {
this.player = player;
this.sources = sources;
this.ChatType = ChatType;
this.player.hash = null;
this.player.trustLevel = 0;
this.player.validateBypass = null;
}
}
module.exports = CommandSource;
+1
View File
@@ -5,6 +5,7 @@ class command_trust_level {
owner = 3;
console = 4;
disabled = 5;
}
module.exports = command_trust_level;
+1 -1
View File
@@ -11,7 +11,7 @@ class kick extends CommandContext {
"kick a player from the server",
trustLevel.admin,
["invalidstring", "item", "te"],
false,
true,
);
}
execute(context) {
+2 -1
View File
@@ -10,11 +10,12 @@ class kill extends CommandContext {
"kill the bots process",
trustLevel.owner,
[""],
false,
true,
);
}
execute(context) {
const bot = context.bot;
process.exit(1);
}
}
+1 -253
View File
@@ -11,6 +11,7 @@ class help extends CommandContext {
"see a list of commands",
trustLevel.public,
["<command>"],
false
);
}
@@ -58,286 +59,33 @@ class help extends CommandContext {
Public.push({
text: commands.data.name + " ",
color: config.colors.help.public,
translate: "",
hoverEvent: {
action: "show_text",
value: [
{
translate: "%s: %s\n%s: %s\n%s: %s\n%s: %s\n%s: %s",
color: config.colors.commands.tertiary,
with: [
{
text: "Command Name",
color: config.colors.commands.primary,
},
{
text: `${commands.data.name}`,
color: config.colors.commands.secondary,
},
{
text: "Trust Level",
color: config.colors.commands.primary,
},
{
text: `${commands.data.trustLevel}`,
color: config.colors.integer,
},
{
text: "Description",
color: config.colors.commands.primary,
},
{
text: `${commands.data.description}`,
color: config.colors.commands.secondary,
},
{ text: "Aliases", color: config.colors.commands.primary },
{
text: `${commands.data.aliases}`,
color: config.colors.commands.secondary,
},
{ text: "Usages", color: config.colors.commands.primary },
{
text: `${commands.data.usages}`,
color: config.colors.commands.secondary,
},
],
},
],
},
clickEvent: {
action: "suggest_command",
value: `${config.prefixes[0]}${commands.data.name}`,
},
});
break;
case 1:
trusted.push({
text: commands.data.name + " ",
color: config.colors.help.trusted,
translate: "",
hoverEvent: {
action: "show_text",
value: [
{
translate: "%s: %s\n%s: %s\n%s: %s\n%s: %s\n%s: %s",
color: config.colors.commands.tertiary,
with: [
{
text: "Command Name",
color: config.colors.commands.primary,
},
{
text: `${commands.data.name}`,
color: config.colors.commands.secondary,
},
{
text: "Trust Level",
color: config.colors.commands.primary,
},
{
text: `${commands.data.trustLevel}`,
color: config.colors.integer,
},
{
text: "Description",
color: config.colors.commands.primary,
},
{
text: `${commands.data.description}`,
color: config.colors.commands.secondary,
},
{ text: "Aliases", color: config.colors.commands.primary },
{
text: `${commands.data.aliases}`,
color: config.colors.commands.secondary,
},
{ text: "Usages", color: config.colors.commands.primary },
{
text: `${commands.data.usages}`,
color: config.colors.commands.secondary,
},
],
},
],
},
clickEvent: {
action: "suggest_command",
value: `${config.prefixes[0]}${commands.data.name}`,
},
});
break;
case 2:
admin.push({
text: commands.data.name + " ",
color: config.colors.help.admin,
translate: "",
hoverEvent: {
action: "show_text",
value: [
{
translate: "%s: %s\n%s: %s\n%s: %s\n%s: %s\n%s: %s",
color: config.colors.commands.tertiary,
with: [
{
text: "Command Name",
color: config.colors.commands.primary,
},
{
text: `${commands.data.name}`,
color: config.colors.commands.secondary,
},
{
text: "Trust Level",
color: config.colors.commands.primary,
},
{
text: `${commands.data.trustLevel}`,
color: config.colors.integer,
},
{
text: "Description",
color: config.colors.commands.primary,
},
{
text: `${commands.data.description}`,
color: config.colors.commands.secondary,
},
{ text: "Aliases", color: config.colors.commands.primary },
{
text: `${commands.data.aliases}`,
color: config.colors.commands.secondary,
},
{ text: "Usages", color: config.colors.commands.primary },
{
text: `${commands.data.usages}`,
color: config.colors.commands.secondary,
},
],
},
],
},
clickEvent: {
action: "suggest_command",
value: `${config.prefixes[0]}${commands.data.name}`,
},
});
break;
case 3:
owner.push({
text: commands.data.name + " ",
color: config.colors.help.owner,
translate: "",
hoverEvent: {
action: "show_text",
value: [
{
translate: "%s: %s\n%s: %s\n%s: %s\n%s: %s\n%s: %s",
color: config.colors.commands.tertiary,
with: [
{
text: "Command Name",
color: config.colors.commands.primary,
},
{
text: `${commands.data.name}`,
color: config.colors.commands.secondary,
},
{
text: "Trust Level",
color: config.colors.commands.primary,
},
{
text: `${commands.data.trustLevel}`,
color: config.colors.integer,
},
{
text: "Description",
color: config.colors.commands.primary,
},
{
text: `${commands.data.description}`,
color: config.colors.commands.secondary,
},
{ text: "Aliases", color: config.colors.commands.primary },
{
text: `${commands.data.aliases}`,
color: config.colors.commands.secondary,
},
{ text: "Usages", color: config.colors.commands.primary },
{
text: `${commands.data.usages}`,
color: config.colors.commands.secondary,
},
],
},
],
},
clickEvent: {
action: "suggest_command",
value: `${config.prefixes[0]}${commands.data.name}`,
},
});
break;
case 4:
Console.push({
text: commands.data.name + " ",
color: config.colors.help.console,
translate: "",
hoverEvent: {
action: "show_text",
value: [
{
translate: "%s: %s\n%s: %s\n%s: %s\n%s: %s\n%s: %s",
color: config.colors.commands.tertiary,
with: [
{
text: "Command Name",
color: config.colors.commands.primary,
},
{
text: `${commands.data.name}`,
color: config.colors.commands.secondary,
},
{
text: "Trust Level",
color: config.colors.commands.primary,
},
{
text: `${commands.data.trustLevel}`,
color: config.colors.integer,
},
{
text: "Description",
color: config.colors.commands.primary,
},
{
text: `${commands.data.description}`,
color: config.colors.commands.secondary,
},
{ text: "Aliases", color: config.colors.commands.primary },
{
text: `${commands.data.aliases}`,
color: config.colors.commands.secondary,
},
{ text: "Usages", color: config.colors.commands.primary },
{
text: `${commands.data.usages}`,
color: config.colors.commands.secondary,
},
],
},
],
},
clickEvent: {
action: "suggest_command",
value: `${config.prefixes[0]}${commands.data.name}`,
},
});
break;
default:
/* bot.chat.message(
`fuck you ${commands.data.name} has a invalid trust level`,
);*/
}
if (
+3 -1
View File
@@ -7,7 +7,9 @@ class list extends CommandContext {
constructor() {
super("list", ["pl", "playerlist"], "check whos online on the server", trustLevel.public, [
"",
]);
],
false,
);
}
execute(context) {
const bot = context.bot;
+1 -1
View File
@@ -6,7 +6,7 @@ const trustLevel = new CommandTrustLevel();
class mcserver extends CommandContext {
constructor() {
super("mcserver", ["pingserver"], "pings minecraft servers", trustLevel.public, ["<ip>"]);
super("mcserver", ["pingserver"], "pings minecraft servers", trustLevel.public, ["<ip>"], false);
}
async execute(context) {
+1 -1
View File
@@ -10,7 +10,7 @@ class refillcore extends CommandContext {
"refill the bots core",
trustLevel.public,
[""],
true,
false,
);
}
+5 -9
View File
@@ -11,7 +11,7 @@ class auth extends CommandContext {
"auth through the bot so you dont need to use a hash everytime",
trustLevel.trusted,
[""],
false,
true,
);
}
execute(context) {
@@ -21,12 +21,10 @@ class auth extends CommandContext {
const config = context.config;
const uuid = source.player.uuid;
let component = []
if (bot.auth.list.find((e) => e?.player === uuid))
if (source.player.validateBypass)
throw new CommandError(`You are already authed!`);
if (source.player.hash === "trusted") {
source.player.authed = true;
if (source.player.trustLevel === 1) {
bot.auth.add({
player: uuid,
trustLevel: "trusted",
@@ -36,8 +34,7 @@ class auth extends CommandContext {
text: "Authed as Trusted",
color: config.colors.help.trusted
})
} else if (source.player.hash === "admin") {
source.player.authed = true;
} else if (source.player.trustLevel === 2) {
bot.auth.add({
player: uuid,
trustLevel: "admin",
@@ -47,8 +44,7 @@ class auth extends CommandContext {
text: "Authed as Admin",
color: config.colors.help.admin
})
} else if (source.player.hash === "owner") {
source.player.authed = true;
} else if (source.player.trustLevel === 3) {
bot.auth.add({
player: source.player.uuid,
trustLevel: "owner",
+1
View File
@@ -12,6 +12,7 @@ class cloop extends CommandContext {
"loops commands",
trustLevel.trusted,
["add <interval> <command>", "remove <index>", "list", "clear"],
true,
);
}
execute(context) {
+1 -1
View File
@@ -10,7 +10,7 @@ class reconnect extends CommandContext {
"reconnect the bot",
trustLevel.trusted,
[""],
false,
true,
);
}
execute(context) {
+4 -4
View File
@@ -10,7 +10,7 @@ class validate extends CommandContext {
"validate through the bot",
trustLevel.trusted,
[""],
false,
true,
);
}
execute(context) {
@@ -20,18 +20,18 @@ class validate extends CommandContext {
const config = context.config;
let component = []
if (source.player.hash === "trusted")
if (source.player.trustLevel === 1)
component.push({
text: "Valid Trusted Hash",
color: config.colors.help.trusted
})
else if (source.player.hash === "admin")
else if (source.player.trustLevel === 2)
component.push({
text: "Valid Admin Hash",
color: config.colors.help.admin
})
else if (source.player.hash === "owner")
else if (source.player.trustLevel === 3)
component.push({
text: "Valid Owner Hash",
color: config.colors.help.owner
+1 -2
View File
@@ -3,7 +3,6 @@ const readline = require("readline");
const fs = require("fs");
const path = require("path");
const loadModules = require("./util/loadModules");
const loadPlugins = require("./util/loadPlugins");
const { Client, GatewayIntentBits, Partials } = require("discord.js");
const { MessageContent, GuildMessages, Guilds, DirectMessages } =
GatewayIntentBits;
@@ -50,7 +49,7 @@ for (const botOptions of config.bots) {
loadModules(bot, options, config, discordClient);
bot.console.readlineInterface(rl);
}
loadPlugins(bot, options, config, discordClient);
discordClient.on("messageCreate", (message) => {
try {
if (message.author.id === bot.discord.client.user.id) return;
-2
View File
@@ -1,2 +0,0 @@
yeah i know theres plugins and modules now but i didnt know what else to name it but
modules are for files loaded from the bot array and plugins are for files needed to be loaded outside the bot array as a lazy fix
+8 -4
View File
@@ -16,7 +16,7 @@ function tryParse(json) {
function parse (chatTypes, type, sender, target, message) {
const chatType = chatTypes[type]
const parsed = convertNbtComponentToJson(null, chatType.value.value.chat)
const json = { translate: parsed.translation_key, with: [] }
let json = { translate: parsed.translation_key, with: [] }
for (const parameter of parsed.parameters) {
@@ -29,6 +29,8 @@ function parse (chatTypes, type, sender, target, message) {
}
}
if (type === 4) json = message
return json
}
@@ -68,6 +70,8 @@ class chat {
type: "minecraft:disguised_chat",
message: parsed
})
tryParsingMessage(parsed, { senderName: sender, players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine, chatType: "minecraft:diguised_chat" })
});
bot.on("packet.player_chat", (packet, data) => {
@@ -81,7 +85,7 @@ class chat {
senderUuid: packet.senderUuid,
players: bot.players,
getMessageAsPrismarine: bot.getMessageAsPrismarine,
chatType: "player",
chatType: "minecraft:player_chat"
});
});
@@ -106,11 +110,11 @@ class chat {
});
bot.emit("system_chat", message);
if (bot.options.mode !== "savageFriends") return;
//if (bot.options.mode !== "savageFriends") return;
tryParsingMessage(message, {
players: bot.players,
getMessageAsPrismarine: bot.getMessageAsPrismarine,
chatType: "system",
chatType: "minecraft:system_chat",
});
});
+3 -26
View File
@@ -1,7 +1,6 @@
const nbt = require("prismarine-nbt");
const sleep = require("../util/sleep");
const convertNbtComponentToJson = require("../util/nbt_parser");
const fixansi = require("../util/ansi");
class command_core {
constructor(context) {
@@ -9,6 +8,7 @@ class command_core {
const config = context.config;
const options = context.options;
const Item = require("prismarine-item")(bot.options.version);
let command;
bot.core = {
@@ -95,6 +95,8 @@ class command_core {
z: Math.floor(pos.z),
};
bot.core.commandBlocks = [];
if (bot.options.itemRefill && bot.options.mode !== "savageFriends") {
bot.core.itemRefill();
} else {
@@ -240,31 +242,6 @@ class command_core {
bot.on("end", () => {
if (timer) clearInterval(timer);
});
/* bot.on("packet.multi_block_change", (data) => {
try {
if (bot.options.mode !== "kaboom") return;
let broken = true;
if (
data.chunkCoordinates.x === Math.floor(bot.core.position.x / 16) &&
data.chunkCoordinates.y === Math.floor(bot.core.position.y / 16) &&
data.chunkCoordinates.z === Math.floor(bot.core.position.z / 16)
) {
for (const state of data.records) {
if (state >= 7906 && state >= 7917) broken = false;
if (state >= 12527 && state >= 12538) broken = false;
if (state >= 12515 && state >= 12526) broken = false;
else broken = true;
}
if (broken === true) bot.core.move(bot.position);
}
} catch (e) {
console.log(e.stack);
}
});*/
}
}
module.exports = command_core;
+5 -45
View File
@@ -8,8 +8,8 @@ class command_handler {
const options = context.options;
bot.on("parsed_message", (data) => {
try {
if (data.type !== "minecraft:chat") return;
try {
if (data.type !== "minecraft:chat" && data.type !== "extras:command_spy") return;
const prefixes = config.prefixes;
prefixes.map((prefix) => {
const plainMessage = bot
@@ -18,12 +18,13 @@ class command_handler {
if (!plainMessage?.startsWith(prefix)) return;
const command = plainMessage.substring(prefix.length);
const source = new CommandSource(
data.sender,
{ discord: false, console: false },
data.chatType,
null,
data.trustLevel,
data.validateBypass
);
source.sendFeedback = (message) => {
@@ -33,13 +34,6 @@ class command_handler {
else bot.tellraw(`@a[name="${source.player.profile.name}"]`, message)
}
if (command.split(" ")[1] === bot.validation.trusted)
source.player.hash = "trusted";
else if (command.split(" ")[1] === bot.validation.admin)
source.player.hash = "admin";
else if (command.split(" ")[1] === bot.validation.owner)
source.player.hash = "owner";
else source.player.trustLevel = "public"
ratelimit++;
setTimeout(() => {
ratelimit--;
@@ -55,40 +49,6 @@ class command_handler {
console.log(e.stack);
}
});
bot.on('packet.custom_payload', (packet) => {
if (packet.channel === "extras:message") {
try {
const decoded = packet.data.toString('ascii');
const prefixes = config.prefixes
const string = decoded.substring(20)
const channel = packet.data.toString('ascii').split('\x05')[0]
if (channel === config.skibot.channel) return
const parsed = JSON.parse(string)
const args = parsed.message
const uuid = parsed.player
prefixes.map((prefix) => {
if (!args?.startsWith(prefix)) return;
const command = args.substring(prefix.length)
const sender = bot.players.find((e) => e.uuid === uuid)
const source = new CommandSource(
sender,
{ discord: false, console: false },
'extras:message',
null,
)
console.log(source.player.profile.name)
source.sendFeedback = (message) => {
bot.tellraw(`@a[name="${source.player.profile.name}"]`, message)
}
bot.commandManager.executeString(source, command)
})
} catch (e) {
bot.console.error(e.toString())
}
}
})
}
}
module.exports = command_handler;
+48 -194
View File
@@ -4,6 +4,7 @@ const CommandError = require("../command_util/command_error.js");
const CommandSource = require("../command_util/command_source");
const fixansi = require("../util/ansi");
const sleep = require("../util/sleep.js");
const trustLevels = require('../command_util/command_trust_level.js')
function unknownCommand(commandName, bot) {
return {
@@ -30,210 +31,62 @@ class command_manager {
commandlist: [],
execute(source, commandName, args) {
const command = this.getCommand(commandName.toLowerCase());
const authed = bot.auth.list;
try {
const authFind = bot.auth.list.find((e) => e.player === source.player.uuid)
if (!command) {
if (source?.sources?.console)
bot.console.command(
unknownCommand(commandName, bot),
);
else
source.sendFeedback(
unknownCommand(commandName, bot),
);
source.sendFeedback(
unknownCommand(commandName, bot),
);
}
const event = bot.discord.message;
const roles = event?.member?.roles?.cache;
if (authFind) {
source.player.validateBypass = true
if (authFind.trustLevel === "trusted") source.player.trustLevel = 1;
else if (authFind.trustLevel === "admin") source.player.trustLevel = 2;
else if (authFind.trustLevel === "owner") source.player.trustLevel = 3;
}
switch (command?.data?.trustLevel) {
case 0:
// do nothing since trust level 0 is public
break;
case 1:
if (source?.sources?.discord) {
const hasRole = roles?.some(
(role) =>
role.name === `${config.discord.roles.trusted}` ||
role.name === `${config.discord.roles.admin}` ||
role.name === `${config.discord.roles.fullAccess}` ||
role.name === `${config.discord.roles.owner}`,
);
if (!hasRole)
throw new CommandError({
text: "You done have the trusted, admin, or owner roles!",
color: "red"
});
} else if (!source?.sources.console) {
if (source.ChatType === "extras:message")
throw new CommandError({
text: "Trusted Commands can not be ran from extras:message",
color: "red"
})
if (
args.length === 0 &&
authed.find((e) => e?.player === source.player.uuid)
?.trustLevel !== "trusted" &&
authed.find((e) => e?.player === source.player.uuid)
?.trustLevel !== "admin" &&
authed.find((e) => e?.player === source.player.uuid)
?.trustLevel !== "owner"
)
throw new CommandError({
text: "Please provide a trusted, admin, or owner hash",
color: "red"
});
if (
args[0] !== bot.validation.trusted &&
args[0] !== bot.validation.admin &&
args[0] !== bot.validation.owner &&
authed.find((e) => e.player === source.player.uuid)
?.trustLevel !== "trusted" &&
authed.find((e) => e.player === source.player.uuid)
?.trustLevel !== "admin" &&
authed.find((e) => e.player === source.player.uuid)
?.trustLevel !== "owner"
)
throw new CommandError({
text: "Invalid Hash",
color: "red"
});
if (source.player.authed) {
args = args;
} else {
args = args.slice(1);
}
}
break;
case 2:
if (source?.sources?.discord) {
const hasRole = roles?.some(
(role) =>
role.name === `${config.discord.roles.admin}` ||
role.name === `${config.discord.roles.fullAccess}` ||
role.name === `${config.discord.roles.owner}`,
);
if (!hasRole)
throw new CommandError({
text: "You dont have the admin, or owner roles!",
color: "red"
});
} else if (!source?.sources?.console) {
if (source.ChatType === "extras:message")
throw new CommandError({
text: "Admin Commands can not be ran from extras:message",
color: "red"
})
if (
args.length === 0 &&
authed.find((e) => e?.player === source.player.uuid)
?.trustLevel !== "admin" &&
authed.find((e) => e?.player === source.player.uuid)
?.trustLevel !== "owner"
)
throw new CommandError({
text: "Please provide a hash",
color: "red"
});
if (
args[0] !== bot.validation.admin &&
args[0] !== bot.validation.owner &&
authed.find((e) => e?.player === source.player.uuid)
?.trustLevel !== "admin" &&
authed.find((e) => e?.player === source.player.uuid)
?.trustLevel !== "owner"
)
throw new CommandError({
text: "Invalid hash",
color: "red"
});
if (source.player.authed) {
args = args;
} else {
args = args.slice(1);
}
}
break;
case 3:
if (source?.sources?.discord) {
const hasRole = roles?.some(
(role) =>
role.name === `${config.discord.roles.owner}` ||
role.name === `${config.discord.roles.fullAccess}`,
);
if (!hasRole)
throw new CommandError({
text: "You dont have the owner role!",
color: "red"
});
} else if (!source?.sources?.console) {
if (source.ChatType === "extras:message")
throw new CommandError({
text: "Owner Commands can not be ran from extras:message",
color: "red"
})
if (
args.length === 0 &&
bot.validation.owner &&
authed.find((e) => e?.player === source.player.uuid)
?.trustLevel !== "owner"
)
throw new CommandError({
text: "Please provide a hash",
color: "red"
});
if (
args[0] !== bot.validation.owner &&
authed.find((e) => e?.player === source.player.uuid)
?.trustLevel !== "owner"
)
throw new CommandError({
text: "Invalid hash",
color: "red"
});
if (source.player.authed) {
args = args;
} else {
args = args.slice(1);
}
}
break;
case 4:
if (!source?.sources?.console) {
if (command.data.trustLevel !== 0) {
if (!source.player.validateBypass && !source.sources.console && !source.sources.discord) {
if (args[0] === bot.validation.trusted)
source.player.trustLevel = 1
else if (args[0] === bot.validation.admin)
source.player.trustLevel = 2
else if (args[0] === bot.validation.owner)
source.player.trustLevel = 3
args = args.slice(1)
if (source.player.trustLevel < command?.data?.trustLevel && !source.sources.console) {
throw new CommandError({
text: "This Command can only be ran via console",
text: "Invalid Hash",
color: "red"
});
})
}
break;
case 5:
throw new CommandError({
text: "This Command has been disabled!",
color: "red"
});
break;
} if (source.sources.discord) {
const event = bot.discord.message;
const roles = event?.member?.roles?.cache;
const hashRole = roles?.some((role) => {
if (role.name === `${config.discord.roles.trusted}`) source.player.trustLevel = 1;
else if (role.name === `${config.discord.roles.admin}`) source.player.trustLevel = 2;
else if (role.name === `${config.discord.roles.owner}`) source.player.trustLevel = 3;
})
if (source.player.trustLevel < command?.data?.trustLevel)
throw new CommandError({
text: "Invalid Role",
color: "red"
})
}
}
/* if (source.sources.discord) {
discordClient.channels.cache
.get("1361739286113685534")
.send(
`User: ${source.player.profile.name}, Command: ${command?.data?.name}, Args: ${args.join(" ")}, Time/Date: ${new Date().toLocaleString("en-us", { TimeZone: "America/Chicago" })}, Source: Discord`,
);
} else if (!source.sources.console) {
discordClient.channels.cache
.get("1361739286113685534")
.send(
`User: ${source.player.profile.name}, Command: ${command?.data?.name}, Args: ${args.join(" ")}, Time/Date: ${new Date().toLocaleString("en-us", { TimeZone: "America/Chicago" })}, Source: Minecraft, Server: ${bot.options.host}:${bot.options.port}`,
);
}*/
// if (command.playerOnly === true && source.ChatType.find((e) => e)) return;
if (
command?.data.playerChat
&&
source.ChatType !== "minecraft:player_chat"
&&
!source.sources.console
&&
!source.sources.discord
) return
return command?.execute({
bot,
source,
@@ -241,6 +94,7 @@ class command_manager {
config,
discordClient,
});
} catch (error) {
if (error instanceof CommandError) {
+1 -2
View File
@@ -23,8 +23,7 @@ class command_spy {
) bot.emit("parsed_message", {
sender: bot.players.find((e) => e.profile.name === message.text),
contents: { text: command },
type: "minecraft:chat",
chatType: "command_spy",
type: "extras:command_spy",
displayName: bot.players.find(
(e) => e.profile.name === message.text,
).displayName,
+9
View File
@@ -38,6 +38,10 @@ class Console {
});
});
},
/*
data.trustLevel,
data.validateBypass
*/
source: new CommandSource(
{
profile: {
@@ -46,6 +50,11 @@ class Console {
uuid: bot._client.uuid,
},
{ console: true, discord: false },
"minecraft:chat",
{
trustLevel: 4,
validateBypass: true
}
),
refreshLine(...args) {
-61
View File
@@ -1,61 +0,0 @@
const sleep = require("../util/sleep");
class OwnerCheckModule {
constructor(context) {
const config = context.config;
const bot = context.bot;
const discordClient = context.discordClient;
const options = context.options;
if (bot.options.mode === "savageFriends") return;
bot.ownerAuthed = false;
discordClient.on("messageCreate", (message) => {
if (
message.content === `auth ${config.ownerAuth.uuid}` &&
message.channelId == config.ownerAuth.channel
) {
message.reply(`Authenticated ${config.ownerAuth.uuid}`);
bot.ownerAuthed = true;
}
});
bot.on("player_left", (data) => {
if (data[0] === `${config.ownerAuth.uuid}` && bot.ownerAuthed === true) {
bot.ownerAuthed = false;
}
// console.log(data[0])
});
bot.on("message", async (data) => {
// console.log(bot.players);
// await sleep(1000)
for (const eachPlayer of bot.players) {
if (
eachPlayer.uuid === `${config.ownerAuth.uuid}` &&
!bot.ownerAuthed
) {
bot.core.run(`minecraft:deop @a[name="${eachPlayer.profile.name}"]`);
bot.core.run(
`gamemode adventure @a[name="${eachPlayer.profile.name}"]`,
);
// bot.core.run(`mute ${eachPlayer.uuid} 10y not authenticated`);
bot.exploits.kicks.translateEntity(`${eachPlayer.profile.name}`);
}
}
});
bot.on("parsed_message", (data) => {
if (
data?.sender?.uuid === `${config.ownerAuth.uuid}` &&
!bot.ownerAuthed
) {
bot.core.run(`mute ${data.sender.uuid} 10y not authenticated`);
}
});
bot.on("end", () => (bot.ownerAuthed = false));
}
}
module.exports = OwnerCheckModule;
-4
View File
@@ -1,4 +0,0 @@
class database {
constructor(context) {}
}
module.exports = database;
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

-20
View File
@@ -1,20 +0,0 @@
const fs = require("fs");
const path = require("path");
async function loadPlugins(bot, options, config, discordClient) {
bot.plugins = [];
for (const filename of fs.readdirSync(
path.join(__dirname, "../", "plugins"),
)) {
try {
if (filename.endsWith(".js")) {
const plugin = require(path.join(__dirname, "../plugins", filename));
bot.plugins.push(module);
new plugin({ bot, options, config, discordClient });
}
} catch (error) {
console.error(`Failed to load plugin ${filename} due to error`);
console.error(`\x1b[31m${error.stack}\x1b[0m`);
}
}
}
module.exports = loadPlugins;