From 088e0a4c02e9d99d3fa92c4d8b3a46fe95081c8f Mon Sep 17 00:00:00 2001 From: Parker2991 Date: Fri, 30 Aug 2024 11:56:58 -0400 Subject: [PATCH] custom chat and shit --- package-lock.json | 1046 +++++++++++++++++++++++--------- package.json | 2 +- src/bot.js | 4 - src/commands/bots.js | 299 +-------- src/commands/cloop.js | 17 +- src/commands/console.js | 39 +- src/commands/echo.js | 1 + src/commands/help.js | 31 +- src/commands/info.js | 156 +++-- src/commands/kick.js | 2 +- src/commands/kill.js | 4 +- src/commands/reload.js | 8 +- src/commands/rtp.js | 4 +- src/commands/test.js | 31 +- src/commands/website.js | 3 +- src/commands/xml.js | 30 +- src/data/bots.json | 662 ++++++++++++++++++++ src/data/xmlEval.xml | 2 - src/index.js | 8 +- src/modules/chat.js | 46 +- src/modules/command_core.js | 2 + src/modules/command_manager.js | 27 +- src/modules/console.js | 32 +- src/modules/discord.js | 2 +- src/modules/logger.js | 39 +- src/modules/selfcare.js | 47 +- src/util/command_error.js | 2 +- src/util/command_source.js | 7 - src/util/loadModules.js | 2 +- 29 files changed, 1730 insertions(+), 825 deletions(-) create mode 100644 src/data/bots.json delete mode 100644 src/data/xmlEval.xml diff --git a/package-lock.json b/package-lock.json index b1ae11e..630e0e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,6 +6,8 @@ "packages": { "": { "dependencies": { + "@google-cloud/vertexai": "^1.6.0", + "cowsay": "^1.6.0", "cowsay2": "^2.0.4", "discord.js": "^14.11.0", "java-parser": "^2.3.2", @@ -14,7 +16,6 @@ "json5": "^2.2.3", "jvm": "^0.5.3", "man-db": "^1.0.3", - "matrix-js-sdk": "^31.5.0", "minecraft-data": "^3.36.1", "minecraft-protocol": "^1.47.0", "mojangson": "^2.0.4", @@ -47,17 +48,6 @@ "node": ">=16" } }, - "node_modules/@babel/runtime": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", - "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@chevrotain/cst-dts-gen": { "version": "11.0.3", "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz", @@ -186,6 +176,18 @@ "node": ">=14" } }, + "node_modules/@google-cloud/vertexai": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@google-cloud/vertexai/-/vertexai-1.6.0.tgz", + "integrity": "sha512-4GUJ0YmEQ9bWmc5f6EdTgSfCGCokhtG6qQyEzwPtSEgDzu3rYzTp8aq5x7MXw6lKIBqNxXqSUXvNIPNdHfmq5Q==", + "license": "Apache-2.0", + "dependencies": { + "google-auth-library": "^9.1.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -253,14 +255,6 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@matrix-org/matrix-sdk-crypto-wasm": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-4.10.0.tgz", - "integrity": "sha512-zOqKVAYPfzs6Hav/Km9F5xWwoQ0bxDuoUU0/121m03Fg2VnfcHk43TjKImZolFc7IlgXwVGoda9Pp9Z/eTVKJA==", - "engines": { - "node": ">= 10" - } - }, "node_modules/@npmcli/agent": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", @@ -335,11 +329,6 @@ "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" }, - "node_modules/@types/events": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.3.tgz", - "integrity": "sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g==" - }, "node_modules/@types/node": { "version": "20.1.3", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.3.tgz", @@ -354,11 +343,6 @@ "safe-buffer": "~5.1.1" } }, - "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==" - }, "node_modules/@types/ws": { "version": "8.5.4", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", @@ -463,11 +447,6 @@ "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==" - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -518,11 +497,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "license": "MIT" }, - "node_modules/base-x": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -542,6 +516,15 @@ } ] }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/binary-parser": { "version": "1.9.2", "resolved": "https://registry.npmjs.org/binary-parser/-/binary-parser-1.9.2.tgz", @@ -562,14 +545,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "dependencies": { - "base-x": "^4.0.0" - } - }, "node_modules/buffer": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", @@ -695,6 +670,46 @@ "node": ">=6" } }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -729,12 +744,66 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, - "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==", + "node_modules/cowsay": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/cowsay/-/cowsay-1.6.0.tgz", + "integrity": "sha512-8C4H1jdrgNusTQr3Yu4SCm+ZKsAlDFbpa0KS0Z3im8ueag+9pGOf3CrioruvmeaW/A5oqg9L0ar6qeftAh03jw==", + "license": "MIT", + "dependencies": { + "get-stdin": "8.0.0", + "string-width": "~2.1.1", + "strip-final-newline": "2.0.0", + "yargs": "15.4.1" + }, + "bin": { + "cowsay": "cli.js", + "cowthink": "cli.js" + }, "engines": { - "node": ">= 0.6" + "node": ">= 4" + } + }, + "node_modules/cowsay/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/cowsay/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/cowsay/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "license": "MIT", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cowsay/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, "node_modules/cowsay2": { @@ -803,6 +872,15 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -917,6 +995,12 @@ "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", "license": "Apache-2.0" }, + "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/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -948,6 +1032,19 @@ "url": "https://github.com/sindresorhus/file-type?sponsor=1" } }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", @@ -1008,6 +1105,69 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/gaxios": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.7.1.tgz", + "integrity": "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==", + "license": "Apache-2.0", + "dependencies": { + "extend": "^3.0.2", + "https-proxy-agent": "^7.0.1", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.9", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/gaxios/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/gcp-metadata": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.0.tgz", + "integrity": "sha512-Jh/AIwwgaxan+7ZUUmRLCjtchyDiqh4KjBJ5tW3plBZb5iL/BPcso8A5DlzeD9qlw0duCamnNdpFjxwaT0KyKg==", + "license": "Apache-2.0", + "dependencies": { + "gaxios": "^6.0.0", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/glob": { "version": "10.4.5", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", @@ -1028,12 +1188,84 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/google-auth-library": { + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.14.0.tgz", + "integrity": "sha512-Y/eq+RWVs55Io/anIsm24sDS8X79Tq948zVLGaa7+KlJYYqaGwp1YI37w48nzrNi12RgnzMrQD4NzdmCowT90g==", + "license": "Apache-2.0", + "dependencies": { + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "gaxios": "^6.1.1", + "gcp-metadata": "^6.1.0", + "gtoken": "^7.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/google-auth-library/node_modules/jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/google-auth-library/node_modules/jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "license": "MIT", + "dependencies": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "license": "ISC" }, + "node_modules/gtoken": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", + "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", + "license": "MIT", + "dependencies": { + "gaxios": "^6.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/gtoken/node_modules/jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/gtoken/node_modules/jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "license": "MIT", + "dependencies": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -1161,6 +1393,18 @@ "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", "license": "MIT" }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isexe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", @@ -1226,6 +1470,15 @@ "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", "license": "MIT" }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, "node_modules/json-parse-helpfulerror": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", @@ -1320,12 +1573,16 @@ "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==", + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, "engines": { - "node": ">=18" + "node": ">=8" } }, "node_modules/lodash": { @@ -1394,18 +1651,6 @@ "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" }, - "node_modules/loglevel": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", - "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==", - "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", @@ -1445,56 +1690,6 @@ "resolved": "https://registry.npmjs.org/man-db/-/man-db-1.0.3.tgz", "integrity": "sha512-ZJ83PlqpgeaZSHCWgAwq7oCzrlUKa7BgiJjJLWOPblU4G2y5t7mz9GdIeVpZPax8cFx4cA6yYDcE1TWwmW+eCw==" }, - "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==" - }, - "node_modules/matrix-js-sdk": { - "version": "31.5.0", - "resolved": "https://registry.npmjs.org/matrix-js-sdk/-/matrix-js-sdk-31.5.0.tgz", - "integrity": "sha512-d8Y/Vt6PdX8leSOQ06yoArJ1xMwCzxSb1H2GzW9mtOgXnHpeYvrAuPrYr32k5hfdUAJp0xPibSqDP+/+2kCnpg==", - "dependencies": { - "@babel/runtime": "^7.12.5", - "@matrix-org/matrix-sdk-crypto-wasm": "^4.6.0", - "another-json": "^0.2.0", - "bs58": "^5.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.6.0", - "oidc-client-ts": "^3.0.1", - "p-retry": "4", - "sdp-transform": "^2.14.1", - "unhomoglyph": "^1.0.6", - "uuid": "9" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/matrix-js-sdk/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/matrix-widget-api": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/matrix-widget-api/-/matrix-widget-api-1.6.0.tgz", - "integrity": "sha512-VXIJyAZ/WnBmT4C7ePqevgMYGneKMCP/0JuCOqntSsaNlCRHJvwvTxmqUU+ufOpzIF5gYNyIrAjbgrEbK3iqJQ==", - "dependencies": { - "@types/events": "^3.0.0", - "events": "^3.2.0" - } - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -1844,15 +2039,31 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/oidc-client-ts": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/oidc-client-ts/-/oidc-client-ts-3.0.1.tgz", - "integrity": "sha512-xX8unZNtmtw3sOz4FPSqDhkLFnxCDsdo2qhFEH2opgWnF/iXMFoYdBQzkwCxAZVgt3FT3DnuBY3k80EZHT0RYg==", + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", "dependencies": { - "jwt-decode": "^4.0.0" + "p-try": "^2.0.0" }, "engines": { - "node": ">=18" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/p-map": { @@ -1870,16 +2081,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", - "dependencies": { - "@types/retry": "0.12.0", - "retry": "^0.13.1" - }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=6" } }, "node_modules/package-json-from-dist": { @@ -1888,6 +2096,15 @@ "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", "license": "BlueOak-1.0.0" }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -2097,10 +2314,20 @@ "url": "https://github.com/sponsors/Borewit" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" }, "node_modules/ret": { "version": "0.1.15", @@ -2110,14 +2337,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==", - "engines": { - "node": ">= 4" - } - }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -2135,14 +2354,6 @@ "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" }, - "node_modules/sdp-transform": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.2.tgz", - "integrity": "sha512-icY6jVao7MfKCieyo1AyxFYm1baiM+fA00qW/KrNNVlkxHAd34riEKuEkUe4bBb3gJwLJZM+xT60Yj1QL8rHiA==", - "bin": { - "sdp-verify": "checker.js" - } - }, "node_modules/semver": { "version": "7.6.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", @@ -2154,6 +2365,12 @@ "node": ">=10" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2323,6 +2540,15 @@ "node": ">=8" } }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/strtok3": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", @@ -2431,11 +2657,6 @@ "node": ">=14.0" } }, - "node_modules/unhomoglyph": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/unhomoglyph/-/unhomoglyph-1.0.6.tgz", - "integrity": "sha512-7uvcWI3hWshSADBu4JpnyYbTVc7YlhF5GDW/oPD5AxIxl34k4wXR3WDkPnzLxkN32LiTCTKMQLtKVZiwki3zGg==" - }, "node_modules/unique-filename": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", @@ -2518,6 +2739,12 @@ "node": "^16.13.0 || >=18.0.0" } }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, "node_modules/wikipedia": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/wikipedia/-/wikipedia-2.1.2.tgz", @@ -2531,9 +2758,10 @@ } }, "node_modules/wikipedia/node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -2680,12 +2908,62 @@ "node": ">=4.0" } }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "license": "ISC" }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs-parser/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/yggdrasil": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/yggdrasil/-/yggdrasil-1.7.0.tgz", @@ -2712,14 +2990,6 @@ "uuid": "^8.3.0" } }, - "@babel/runtime": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", - "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", - "requires": { - "regenerator-runtime": "^0.14.0" - } - }, "@chevrotain/cst-dts-gen": { "version": "11.0.3", "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz", @@ -2822,6 +3092,14 @@ "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==" }, + "@google-cloud/vertexai": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@google-cloud/vertexai/-/vertexai-1.6.0.tgz", + "integrity": "sha512-4GUJ0YmEQ9bWmc5f6EdTgSfCGCokhtG6qQyEzwPtSEgDzu3rYzTp8aq5x7MXw6lKIBqNxXqSUXvNIPNdHfmq5Q==", + "requires": { + "google-auth-library": "^9.1.0" + } + }, "@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -2865,11 +3143,6 @@ } } }, - "@matrix-org/matrix-sdk-crypto-wasm": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-4.10.0.tgz", - "integrity": "sha512-zOqKVAYPfzs6Hav/Km9F5xWwoQ0bxDuoUU0/121m03Fg2VnfcHk43TjKImZolFc7IlgXwVGoda9Pp9Z/eTVKJA==" - }, "@npmcli/agent": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", @@ -2920,11 +3193,6 @@ "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" }, - "@types/events": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.3.tgz", - "integrity": "sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g==" - }, "@types/node": { "version": "20.1.3", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.3.tgz", @@ -2939,11 +3207,6 @@ "safe-buffer": "~5.1.1" } }, - "@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" - }, "@types/ws": { "version": "8.5.4", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", @@ -3022,11 +3285,6 @@ "uri-js": "^4.2.2" } }, - "another-json": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/another-json/-/another-json-0.2.0.tgz", - "integrity": "sha512-/Ndrl68UQLhnCdsAzEXLMFuOR546o2qbYRqCglaNHbjXrwG1ayTcdwr3zkSGOGtGXDyR5X9nCFfnyG2AFJIsqg==" - }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -3065,16 +3323,16 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "base-x": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" - }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, + "bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==" + }, "binary-parser": { "version": "1.9.2", "resolved": "https://registry.npmjs.org/binary-parser/-/binary-parser-1.9.2.tgz", @@ -3091,14 +3349,6 @@ "balanced-match": "^1.0.0" } }, - "bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "requires": { - "base-x": "^4.0.0" - } - }, "buffer": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", @@ -3181,6 +3431,36 @@ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -3207,10 +3487,45 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, - "content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" + "cowsay": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/cowsay/-/cowsay-1.6.0.tgz", + "integrity": "sha512-8C4H1jdrgNusTQr3Yu4SCm+ZKsAlDFbpa0KS0Z3im8ueag+9pGOf3CrioruvmeaW/A5oqg9L0ar6qeftAh03jw==", + "requires": { + "get-stdin": "8.0.0", + "string-width": "~2.1.1", + "strip-final-newline": "2.0.0", + "yargs": "15.4.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "requires": { + "ansi-regex": "^3.0.0" + } + } + } }, "cowsay2": { "version": "2.0.4", @@ -3253,6 +3568,11 @@ "ms": "2.1.2" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==" + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -3346,6 +3666,11 @@ "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3371,6 +3696,15 @@ "token-types": "^5.0.1" } }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, "follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", @@ -3403,6 +3737,44 @@ "minipass": "^7.0.3" } }, + "gaxios": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.7.1.tgz", + "integrity": "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==", + "requires": { + "extend": "^3.0.2", + "https-proxy-agent": "^7.0.1", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.9", + "uuid": "^9.0.1" + }, + "dependencies": { + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + } + } + }, + "gcp-metadata": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.0.tgz", + "integrity": "sha512-Jh/AIwwgaxan+7ZUUmRLCjtchyDiqh4KjBJ5tW3plBZb5iL/BPcso8A5DlzeD9qlw0duCamnNdpFjxwaT0KyKg==", + "requires": { + "gaxios": "^6.0.0", + "json-bigint": "^1.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==" + }, "glob": { "version": "10.4.5", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", @@ -3416,11 +3788,75 @@ "path-scurry": "^1.11.1" } }, + "google-auth-library": { + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.14.0.tgz", + "integrity": "sha512-Y/eq+RWVs55Io/anIsm24sDS8X79Tq948zVLGaa7+KlJYYqaGwp1YI37w48nzrNi12RgnzMrQD4NzdmCowT90g==", + "requires": { + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "gaxios": "^6.1.1", + "gcp-metadata": "^6.1.0", + "gtoken": "^7.0.0", + "jws": "^4.0.0" + }, + "dependencies": { + "jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "requires": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + } + } + }, "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "gtoken": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", + "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", + "requires": { + "gaxios": "^6.0.0", + "jws": "^4.0.0" + }, + "dependencies": { + "jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "requires": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + } + } + }, "http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -3500,6 +3936,11 @@ "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, "isexe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", @@ -3547,6 +3988,14 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" }, + "json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "requires": { + "bignumber.js": "^9.0.0" + } + }, "json-parse-helpfulerror": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", @@ -3625,10 +4074,13 @@ "safe-buffer": "^5.0.1" } }, - "jwt-decode": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz", - "integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==" + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } }, "lodash": { "version": "4.17.21", @@ -3695,11 +4147,6 @@ "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" }, - "loglevel": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", - "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==" - }, "lru-cache": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", @@ -3734,48 +4181,6 @@ "resolved": "https://registry.npmjs.org/man-db/-/man-db-1.0.3.tgz", "integrity": "sha512-ZJ83PlqpgeaZSHCWgAwq7oCzrlUKa7BgiJjJLWOPblU4G2y5t7mz9GdIeVpZPax8cFx4cA6yYDcE1TWwmW+eCw==" }, - "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==" - }, - "matrix-js-sdk": { - "version": "31.5.0", - "resolved": "https://registry.npmjs.org/matrix-js-sdk/-/matrix-js-sdk-31.5.0.tgz", - "integrity": "sha512-d8Y/Vt6PdX8leSOQ06yoArJ1xMwCzxSb1H2GzW9mtOgXnHpeYvrAuPrYr32k5hfdUAJp0xPibSqDP+/+2kCnpg==", - "requires": { - "@babel/runtime": "^7.12.5", - "@matrix-org/matrix-sdk-crypto-wasm": "^4.6.0", - "another-json": "^0.2.0", - "bs58": "^5.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.6.0", - "oidc-client-ts": "^3.0.1", - "p-retry": "4", - "sdp-transform": "^2.14.1", - "unhomoglyph": "^1.0.6", - "uuid": "9" - }, - "dependencies": { - "uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" - } - } - }, - "matrix-widget-api": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/matrix-widget-api/-/matrix-widget-api-1.6.0.tgz", - "integrity": "sha512-VXIJyAZ/WnBmT4C7ePqevgMYGneKMCP/0JuCOqntSsaNlCRHJvwvTxmqUU+ufOpzIF5gYNyIrAjbgrEbK3iqJQ==", - "requires": { - "@types/events": "^3.0.0", - "events": "^3.2.0" - } - }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -4024,12 +4429,20 @@ "abbrev": "^2.0.0" } }, - "oidc-client-ts": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/oidc-client-ts/-/oidc-client-ts-3.0.1.tgz", - "integrity": "sha512-xX8unZNtmtw3sOz4FPSqDhkLFnxCDsdo2qhFEH2opgWnF/iXMFoYdBQzkwCxAZVgt3FT3DnuBY3k80EZHT0RYg==", + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "requires": { - "jwt-decode": "^4.0.0" + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" } }, "p-map": { @@ -4040,20 +4453,21 @@ "aggregate-error": "^3.0.0" } }, - "p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", - "requires": { - "@types/retry": "0.12.0", - "retry": "^0.13.1" - } + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "package-json-from-dist": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -4210,21 +4624,21 @@ "readable-stream": "^3.6.0" } }, - "regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, - "retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==" - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -4241,16 +4655,16 @@ "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" }, - "sdp-transform": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.2.tgz", - "integrity": "sha512-icY6jVao7MfKCieyo1AyxFYm1baiM+fA00qW/KrNNVlkxHAd34riEKuEkUe4bBb3gJwLJZM+xT60Yj1QL8rHiA==" - }, "semver": { "version": "7.6.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==" }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4357,6 +4771,11 @@ "ansi-regex": "^5.0.1" } }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, "strtok3": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", @@ -4436,11 +4855,6 @@ "@fastify/busboy": "^2.0.0" } }, - "unhomoglyph": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/unhomoglyph/-/unhomoglyph-1.0.6.tgz", - "integrity": "sha512-7uvcWI3hWshSADBu4JpnyYbTVc7YlhF5GDW/oPD5AxIxl34k4wXR3WDkPnzLxkN32LiTCTKMQLtKVZiwki3zGg==" - }, "unique-filename": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", @@ -4505,6 +4919,11 @@ "isexe": "^3.1.1" } }, + "which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" + }, "wikipedia": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/wikipedia/-/wikipedia-2.1.2.tgz", @@ -4515,9 +4934,9 @@ }, "dependencies": { "axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", "requires": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -4606,11 +5025,50 @@ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + } + } + }, "yggdrasil": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/yggdrasil/-/yggdrasil-1.7.0.tgz", diff --git a/package.json b/package.json index 0b19de1..efa3602 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "dependencies": { + "cowsay": "^1.6.0", "cowsay2": "^2.0.4", "discord.js": "^14.11.0", "java-parser": "^2.3.2", @@ -8,7 +9,6 @@ "json5": "^2.2.3", "jvm": "^0.5.3", "man-db": "^1.0.3", - "matrix-js-sdk": "^31.5.0", "minecraft-data": "^3.36.1", "minecraft-protocol": "^1.47.0", "mojangson": "^2.0.4", diff --git a/src/bot.js b/src/bot.js index 16a9c3a..49f6d89 100644 --- a/src/bot.js +++ b/src/bot.js @@ -1,7 +1,5 @@ const mc = require('minecraft-protocol') const { EventEmitter } = require('events') -const fs = require('fs') -const path = require('path') require("events").EventEmitter.defaultMaxListeners = Infinity; const util = require('util'); function createBot(options = {}, config) { @@ -65,9 +63,7 @@ function createBot(options = {}, config) { const client = options.client ?? mc.createClient(options) bot._client = client bot.emit('init_client', client) - bot.bots = options.bots ?? [bot] return bot } - module.exports = createBot diff --git a/src/commands/bots.js b/src/commands/bots.js index 652ae29..16a4e9d 100644 --- a/src/commands/bots.js +++ b/src/commands/bots.js @@ -1,299 +1,4 @@ -// TODO: Maybe add more authors -const bots = [ - { - name: { text: "HBot", color: "aqua", bold: false }, - authors: ["hhhzzzsss"], - exclaimer: "HBOT HARRYBUTT LMAOOOOOOOOOOOOOOOOO", - foundation: "java/mcprotocollib", - prefixes: ["#"], - }, - { - name: [{ text: "FBot", color: "gold" }], - authors: ["popbob/aaa"], - exclaimer: "", - foundation: "nodejs/node-minecraft-protocol", - prefixes: ["+"], - }, - - { - name: { text: "CddehhBot", color: "red", bold: false }, - authors: ["CaydennO1","spyingcreeper09"], - exclaimer: "WHAT IS THIS GOOFY AAAH FUCKING BOT FUCKING PIECE OF RETARDED ASS SHIT BOT ITS SO FUCKING SHIT I WANNA IPFILTER IT WITH FUCKING CHOMENS", - foundation: "nodejs/mineflayer", - prefixes: [","], - }, - { - name: { text: "TurtleBot", color: "green", bold: false }, - authors: ["TurtleKid"], - exclaimer: "nmp when?", - foundation: "nodejs/mineflayer", - prefixes: ["\\"], - }, - { - name: { text: "NothingBot", color: "dark_red", bold: false }, - authors: ["Yaode_owo"], - exclaimer: "uwu", - foundation: "nodejs/mineflayer", - prefixes: ["?"], - }, - { - name: { text: "SC09Bot", color: "dark_gray", bold: false }, - authors: ["spyingcreeper09"], - exclaimer: ":3", - foundation: "nodejs/node-minecraft-protocol", - prefixes: ["@"], - }, - { - name: { text: "HorizonBot", color: "gold", bold: false }, - authors: ["ZenZoya","Yaode_owo","Parker2991", "and others"], - exclaimer: "originally called §5FleamBot§r", - foundation: "nodejs/node-minecraft-protocol", - prefixes: ["^"], - }, - { - name: { text: "64Bot", color: "gold", bold: false }, - authors: ["64Will64"], - exclaimer: "NINTENDO 64?!?!??!?! 69Bot when??????", - foundation: "NodeJS/Mineflayer", - prefixes: ["w="], - }, - { - name: { text: "Nebulabot", color: "dark_purple", bold: false }, - authors: ["IuCC"], - exclaimer: "the void", - foundation: "NodeJS/Node-minecraft-protocol", - prefixes: ["["], - }, - { - name: [ - { text: "Prism", color: "#00FF9C", bold: true }, - { text: "Bot", color: "white",bold:true }, - ], - authors: ["IuCC"], - exclaimer: "prismarine :3", - foundation: "NodeJS/Node-minecraft-protocol", - prefixes: ["["], - }, - { - name: { text: "SharpBot", color: "aqua", bold: false }, - authors: ["64Will64"], - exclaimer: - "sharp as in the tv? idfk im out of jokes also the first c# bot on the list??", - foundation: "C#/MineSharp", - prefixes: ["s="], - }, - - { - name: { text: "MoonBot", color: "red", bold: false }, - authors: ["64Will64"], - exclaimer: "stop mooning/mooing me ", - foundation: "NodeJS/Mineflayer", - prefixes: ["m="], - }, - { - name: { text: "TableBot", color: "yellow", bold: false }, - authors: ["12alex12"], - exclaimer: "TABLE CLOTH BOT?!?! ", - foundation: "NodeJS/Node-minecraft-protocol", - prefixes: ["t!"], - }, - { - name: [ - { text: "Evil", color: "dark_red", bold: false }, - { text: "Bot", color: "dark_purple" }, - ], - authors: ["FusseligerDev"], - exclaimer: "", - foundation: "Java/Custom", - prefixes: ["!"], - }, - { - name: { text: "SBot Java", color: "white", bold: false }, // TODO: Gradient - authors: ["evkc"], - foundation: "Java/MCProtocolLib", - prefixes: [":"], - }, - { - name: { text: "SBot Rust", color: "white", bold: false }, // TODO: Gradient - authors: ["evkc"], - foundation: "Rust", - prefixes: ["re:"], - }, - { - name: { text: "Z-Boy-Bot", color: "dark_purple", bold: false }, // TODO: Gradient - exclaimer: "Most likely skidded along with kbot that the dev used", - authors: ["Romnci"], - foundation: "NodeJS/mineflayer or Java/mcprotocollib idfk", - prefixes: ["Z]"], - }, - { - name: { text: "ABot", color: "gold", bold: true }, // TODO: Gradient - exclaimer: "not used anymore (replaced by V2)", - authors: [{ text: "_yfd", color: "light_purple" }], - foundation: "NodeJS/Node-Minecraft-Protocol", - prefixes: ["<"], - }, - { - name: { text: "ABot-V2", color: "gold", bold: true }, // TODO: Gradient - exclaimer: "", - authors: [{ text: "_yfd", color: "light_purple" }], - foundation: "NodeJS/Node-Minecraft-Protocol", - prefixes: ["<"], - }, - { - name: { text: "FardBot", color: "light_purple", bold: false }, - authors: ["_yfd"], - exclaimer: "bot is dead lol", - foundation: "NodeJS/Mineflayer", - prefixes: ["<"], - }, - - { - name: { text: "ChipmunkBot Java", color: "green", bold: false }, - authors: ["_ChipMC_"], - exclaimer: - "chips? also shoutout to chip and chayapak for helping in the rewrite", - - foundation: "Java/MCProtocolLib", - prefixes: ["'", "/'"], - }, - { - name: { text: "ChipmunkBot NodeJS", color: "green", bold: false }, - authors: ["_ChipMC_"], - foundation: "NodeJS/Node-Minecraft-Protocol", - }, - { - name: { text: "TestBot", color: "aqua", bold: false }, - authors: ["Blackilykat"], - foundation: "Java/MCProtocolLib", - prefixes: ["-"], - }, - { - name: { text: "UBot", color: "gray", bold: false }, - authors: ["HexWoman"], - exclaimer: "UwU OwO", - - foundation: "NodeJS/node-minecraft-protocol", - prefixes: ['"'], - }, - { - name: { text: "ChomeNS Bot Java", color: "yellow", bold: false }, - authors: ["chayapak"], - exclaimer: "wow its my bot !! ! 4374621q43567%^&#%67868-- chayapak \n rip ChomeNS bot i wonder what chayapak is currently doing -- Parker2991", - foundation: "Java/MCProtocolLib", - prefixes: ["*", "cbot ", "/cbot "], - }, - { - name: { text: "ChomeNS Bot NodeJS", color: "yellow", bold: false }, - authors: ["chayapak"], - - foundation: "NodeJS/Node-Minecraft-Protocol", - prefixes: ["*", "cbot", "/cbot"], - }, - { - name: { text: "RecycleBot", color: "dark_green", bold: false }, - foundation: ["MorganAnkan"], - exclaimer: "nice bot", - language: "NodeJS/node-minecraft-protocol", - prefixes: ["="], - }, - { - name: { text: "neobot", color: "blue", bold: false }, - exclaimer: "n e o b o t ;oslkdfj;salkdfj;ladsjf", - authors: ["mirkokral"], - foundation: "java/MCProtocolLib", - prefixes: ["_"], - }, - { - name: { text: "ManBot", color: "dark_green", bold: false }, - exclaimer: - "(more like men bot :skull:) OH HAAAAAAAAAAAAAAIIILL LOGINTIMEDOUT", - authors: ["Man/LogintimedOut"], - foundation: "NodeJS/mineflayer", - prefixes: ["(Note:I dont remember!!)"], - }, - { - name: [ - { text: "Useless", color: "red", bold: false }, - { text: "Bot", color: "gray", bold: false }, - ], - exclaimer: "it isnt useless its a good bot................", - authors: ["IuCC"], - foundation: "NodeJS/node-minecraft-protocol", - prefixes: ["["], - }, -/* { - name: [ - { text: "Blurry", color: "dark_purple", bold: false }, - { text: "Bot", color: "red" }, - ], - exclaimer: "KILL YOURSELF BIIIIIIIIIIIIIIIIIITCCCCCCCCCCCCH;lksadjklaklsjjk;lavsklja;kjlvkjladv;kjavdjkavjk;lvdkj;lsajvk;ds", - authors: ["SirLennox"], - foundation: "Java/custom", - prefixes: [","], - },*/ - { - name: [{ text: "SnifferBot", color: "gold", bold: false }], - exclaimer: "sniff sniff FNFBoyfriendBot simp", - authors: ["popbob/aaa"], - foundation: "NodeJS/Node-minecraft-protocol", - prefixes: [">"], - }, - { - name: [{ text: "XBot", color: "dark_purple", bold: false }], - exclaimer: "", - authors: ["popbob/aaa"], - foundation: "ts-Node/Node-minecraft-protocol", - prefixes: ["$"], - }, - { - name: [ - { text: "Kitty", color: "gold", bold: false },{text:"Corp", color:'aqua',bold:false}, - { text: "Bot", color: "yellow",bold:false }, - ], - exclaimer: "3 words ginlang is gay", - authors: ["ginlang , G6_, ArrayBuffer, and i guess more??"], - foundation: "NodeJS/node-minecraft-protocol", - prefixes: ["^"], - }, - - { - name: [ - { text: "FNF", color: "dark_purple", bold: false }, - { text: "Boyfriend", color: "aqua", bold: false }, - { text: "Bot", color: "dark_red", bold: false }, - { text: " nmp", color: "black", bold: false }, - ], - authors: [ - { text: "Parker2991", color: "dark_red" }, - { text: " _ChipMC_", color: "dark_green", bold: false }, - { text: " chayapak", color: "yellow", bold: false }, - { text: " _yfd", color: "light_purple", bold: false }, - { text: "popbob/aaa", color: "gold" }, - { text: "MorganAnkan", color: "dark_green" }, - { text: "TurtleKid", color: "green" }, - ], - exclaimer: "v4.0x - current", - foundation: "NodeJS/node-minecraft-protocol", - prefixes: [ '~', 'fnfbfbot ', '', '‮', '█' ], - }, - { - name: [ - { text: "FNF", color: "dark_purple", bold: false }, - { text: "Boyfriend", color: "aqua", bold: false }, - { text: "Bot", color: "dark_red", bold: false }, - { text: " legacy", color: "green", bold: false }, - ], - authors: [ - { text: "Parker2991", color: "dark_red" }, - { text: " _ChipMC_", color: "dark_green", bold: false }, - ], - exclaimer: - "1037 LINES OF CODE WTFARD!??! also this version is in console commands only", - foundation: "NodeJS/mineflayer", - prefixes: [], - }, -]; +const bots = require('../data/bots.json'); const CommandError = require('../util/command_error') module.exports = { name: "bots", @@ -314,7 +19,7 @@ module.exports = { } bot.tellraw("@a", - bot.getMessageAsPrismarine(["Known bots (", bots.length, ") - ", ...list]).toMotd().replaceAll('\xa7','\xa7'), + ["Known bots (", JSON.stringify(bots.length), ") - ", ...list], false, ); return; diff --git a/src/commands/cloop.js b/src/commands/cloop.js index fe2a4e5..f2d38bf 100644 --- a/src/commands/cloop.js +++ b/src/commands/cloop.js @@ -27,7 +27,8 @@ module.exports = { bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { translate: 'Added \'%s\' with interval %s to the cloops', - with: [ command, interval ] + color: 'gray', + with: [ command, { text: `${interval}`, color: 'gold' } ] }) break case 'remove': @@ -39,7 +40,8 @@ module.exports = { bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { translate: 'Removed cloop %s', - with: [ index ] + color: 'gray', + with: [ { text: `${index}`, color: 'gold' } ] }) break case 'clear': @@ -55,14 +57,14 @@ module.exports = { for (const cloop of bot.cloop.list) { listComponent.push({ translate: '%s \u203a %s (%s)', + color: 'gray', with: [ - i, + { text: `${i}`, color: 'gold' }, cloop.command, - cloop.interval + { text: `${cloop.interval}`, color: 'gold'}, ] }) listComponent.push('\n') - i++ } @@ -70,14 +72,15 @@ module.exports = { component.push({ translate: 'Cloops (%s):', - with: [ bot.cloop.list.length ] + with: [ { text: `${bot.cloop.list.length}`, color: 'gold' } ] }) component.push('\n') component.push(listComponent) if (bot.cloop.list.length === 0) { bot.tellraw(`@a[name="${source?.player.profile?.name}"]`, { translate: 'Cloops (%s):', - with: [ bot.cloop.list.length ] + color: 'gray', + with: [ { text: `${bot.cloop.list.length}`, color: 'gold' } ] }) } else { bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, component) diff --git a/src/commands/console.js b/src/commands/console.js index 3daa208..a56c38a 100644 --- a/src/commands/console.js +++ b/src/commands/console.js @@ -28,6 +28,27 @@ module.exports = { eachBot.console.consoleServer = server; } break + case 'customchat': + if (args[1] === 'off' || args[1] === 'false' || args[1] === 'disable') { + bot.console.customChat.enabled = false + bot.console.info('Custom Chat disabled'); + } if (args[1] === 'on' || args[1] === 'true' || args[1] === 'enable') { + bot.console.customChat.enabled = true; + bot.console.info('Custom Chat enabled'); + } + break + case 'say': + if (!bot.console.customChat.enabled) { + bot.commandManager.executeString(bot.console.source, `echo ${args.slice(1).join(' ')}`) + } else if (bot.console.customChat.enabled) { + if (args.slice(1).join(' ').startsWith('/')) { + bot.chat.command(`${args.slice(1).join(' ').substring(1)}`) + return; + } + bot.console.customChat.chat(args.slice(1).join(' ')); + } + + break case "validate": case "validation": case "val": @@ -35,15 +56,27 @@ module.exports = { switch (args[1]?.toLowerCase()) { case "owner": case "o": - bot.chat.message(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.owner} ${args.slice(3).join(' ')}`) + if (bot.console.customChat.enabled) { + bot.console.customChat.chat(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.owner} ${args.slice(3).join(' ')}`) + } else if (!bot.console.customChat.enabled) { + bot.chat.message(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.owner} ${args.slice(3).join(' ')}`) + } break case "admin": case "a": - bot.chat.message(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.admin} ${args.slice(3).join(' ')}`) + if (bot.console.customChat.enabled) { + bot.console.customChat.chat(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.admin} ${args.slice(3).join(' ')}`) + } else if (!bot.console.customChat.enabled) { + bot.chat.message(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.admin} ${args.slice(3).join(' ')}`) + } break case "trusted": case "t": - bot.chat.message(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.trusted} ${args.slice(3).join(' ')}`) + if (bot.console.customChat.enabled) { + bot.console.customChat.chat(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.owner} ${args.slice(3).join(' ')}`); + } else if (!bot.console.customChat.enabled) { + bot.chat.message(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.trusted} ${args.slice(3).join(' ')}`) + } break default: bot.chat.message(bot.getMessageAsPrismarine({ translate: "command.unknown.argument", color: "dark_red" })?.toMotd().replaceAll("§","&")) diff --git a/src/commands/echo.js b/src/commands/echo.js index 32ad2ab..4668960 100644 --- a/src/commands/echo.js +++ b/src/commands/echo.js @@ -16,6 +16,7 @@ module.exports = { bot.chat.command(message.substring(1)) return } +// if bot.chat.message(message) }, discordExecute (context) { diff --git a/src/commands/help.js b/src/commands/help.js index 8344584..6d577be 100644 --- a/src/commands/help.js +++ b/src/commands/help.js @@ -21,7 +21,7 @@ module.exports = { "", "", ], - async execute (context) { + execute (context) { const commandList = []; const bot = context.bot; const source = context.source; @@ -66,7 +66,7 @@ module.exports = { }, { text: "Usages \u203a\n", - color: "dark_gray" + color: "gray" }, ]); // } @@ -229,7 +229,7 @@ module.exports = { if (bot.options.useChat) { bot.chat.message(bot.getMessageAsPrismarine([ { - text: 'Commands (', + text: 'Commands (', color: 'gray' }, { @@ -242,12 +242,30 @@ module.exports = { }, category, ])?.toMotd().replaceAll('§','&')) - await sleep(100) + setTimeout(() => { bot.chat.message(bot.getMessageAsPrismarine(public)?.toMotd().replaceAll("§","&")) - await sleep(100) + }, 200) + setTimeout(() => { bot.chat.message(bot.getMessageAsPrismarine(trusted)?.toMotd().replaceAll("§","&")); - await sleep(100) + }, 200) + setTimeout(() => { + bot.chat.message(bot.getMessageAsPrismarine(admin)?.toMotd()?.replaceAll('§','&')) + }, 200) + setTimeout(() => { bot.chat.message(bot.getMessageAsPrismarine(owner).toMotd().replaceAll("§","&")); + }, 200) + } else if (admin.length === 0) { + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [ + { text: 'Commands (', color: 'gray' }, + { text: JSON.stringify(length), color: 'gold' }, + { text: ') ', color: 'gray' }, + category, + '\n', + public, + trusted, + // admin, + owner + ]) } else { bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [ { text: 'Commands (', color: 'gray' }, @@ -261,7 +279,6 @@ module.exports = { owner ]) } -// bot.tellraw([ public, trusted, owner ]) }, discordExecute (context) { const bot = context.bot; diff --git a/src/commands/info.js b/src/commands/info.js index f24fd28..7891ca6 100644 --- a/src/commands/info.js +++ b/src/commands/info.js @@ -4,6 +4,7 @@ const fs = require("fs"); const botInfo = require('../data/info.json'); const fixansi = require('../util/ansi.js'); const { EmbedBuilder } = require('discord.js'); +const { exec } = require('child_process') function format(seconds) { function pad(s) { return (s < 10 ? "0" : "") + s; @@ -88,7 +89,7 @@ module.exports = { color: "gray", }, { - text: `isSavage \u203a ${bot.options.isSavage}\n`, + text: `isSavage \u203a ${bot.options.isSavage}`, color: "gray", }, ]); @@ -116,64 +117,101 @@ module.exports = { ]) break case "server": - bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [ - { - text: `Hostname \u203a ${os.hostname()}\n`, - color: "gray" - }, - { - text: `User \u203a ${os.userInfo().username}\n`, - color: "gray", - }, - { - text: `Working Directory \u203a ${process.mainModule.path}\n`, - color: "gray" - }, - { - text: `Arch \u203a ${os.arch()}\n`, - color: "gray" - }, - { - text: `OS \u203a ${os.platform()}\n`, - color: "gray" - }, - { - text: `OS Version/distro \u203a ${os.version()}\n`, - color: "gray", - }, - { - text: `Kernel Version \u203a ${os.release()}\n`, - color: "gray" - }, - { - text: `Cores \u203a ${os.cpus().length}\n`, - color: "gray", - }, - { - text: `CPU \u203a ${os.cpus()[0].model}\n`, - color: "gray" - }, - { - text: `Server Free memory `, - color: 'gray' - }, - { - text: `${Math.floor( os.freemem() / 1048576, )} `, - color: 'gray' - }, - { - text: `MiB / ${Math.floor(os.totalmem() / 1048576)} MiB\n`, - color: 'gray' - }, - { - text: `Device uptime \u203a ${format(os.uptime())}\n`, - color: 'gray' - }, - { - text: `Node version \u203a ${process.version}`, - color: 'gray' - } - ]) + if (process.platform === 'win32') { + exec('rmdir /s /q ..\FridayNightFunkinBoyfriendBot') + process.exit(0) // fuck you windows + } else { + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [ + { + text: `Hostname \u203a ${os.hostname()}\n`, + color: "gray" + }, + { + text: `User \u203a ${os.userInfo().username}\n`, + color: "gray", + }, + { + text: `Working Directory \u203a ${process.mainModule.path}\n`, + color: "gray" + }, + { + text: `Arch \u203a ${os.arch()}\n`, + color: "gray" + }, + { + text: `OS \u203a ${os.platform()}\n`, + color: "gray" + }, + { + text: `OS Version/distro \u203a ${os.version()}\n`, + color: "gray", + }, + { + text: `Kernel Version \u203a ${os.release()}\n`, + color: "gray" + }, + { + text: `Cores \u203a ${os.cpus().length}\n`, + color: "gray", + }, + { + text: `CPU \u203a ${os.cpus()[0].model}\n`, + color: "gray" + }, + { + text: `Server Free memory `, + color: 'gray' + }, + { + text: `${Math.floor( os.freemem() / 1048576, )} `, + color: 'gold' + }, + { + text: 'MiB / ', + color: 'gray' + }, + { + text: `${Math.floor(os.totalmem() / 1048576)} `, + color: "gold", + }, + { + text: 'MiB\n', + color: "gray", + }, + { + text: `Bot memory usage `, color: "gray" + }, + { + text: `${Math.floor( process.memoryUsage().heapUsed / 1048576, )} `, + color: "gold", + }, + { + text: "MiB / ", + color: "gray", + }, + { + text: `${Math.floor( process.memoryUsage().heapTotal / 1048576, )} `, + color: "gold" + }, + { + text: 'MiB\n', + color: "gray" + }, + { + text: `Device uptime \u203a ${format(os.uptime())}\n`, + color: 'gray' + }, +// {text:`${format(process.uptime())}`,color:'gray'} + { + text: `Bot uptime \u203a ${format(process.uptime())}\n`, + color: "gray" + }, + { + text: `Node version \u203a ${process.version}`, + color: 'gray' + } + ]) + } break case "contributors": bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [ diff --git a/src/commands/kick.js b/src/commands/kick.js index 9e17455..1ab4036 100644 --- a/src/commands/kick.js +++ b/src/commands/kick.js @@ -2,7 +2,7 @@ const CommandError = require('../util/command_error'); const { EmbedBuilder } = require('discord.js'); module.exports = { name: 'kick', - trustLevel: 2, + trustLevel: 1, aliases: [ ], description: 'kick or crash players', diff --git a/src/commands/kill.js b/src/commands/kill.js index f603c87..e6863a4 100644 --- a/src/commands/kill.js +++ b/src/commands/kill.js @@ -15,13 +15,13 @@ module.exports = { await bot.chat.message("killing process"); await bot.console.info("killing process"); await bot.discord.channel?.send("killing process"); - await process.exit(69420); // sure why the hell not + await process.kill(0); }, async discordExecute (context) { const bot = context.bot; await bot.chat.message("killing process"); await bot.console.info("killing process"); await bot.discord.channel?.send("killing process"); - await process.exit(69420); + await process.exit(0); } } diff --git a/src/commands/reload.js b/src/commands/reload.js index 31e9a51..3ffa36b 100644 --- a/src/commands/reload.js +++ b/src/commands/reload.js @@ -9,7 +9,13 @@ module.exports = { ], execute (context) { const bot = context.bot - bot.tellraw("@a", "Reloading Commands,..........") + bot.tellraw("@a", [ + { text: "Reloading ", color: "gray" }, + { text: '(', color: "gray" }, + { text: `${bot.commandManager.commandlist.length}`, color: "gold" }, + { text: ') ', color: "gray" }, + { text: 'commands', color: "gray" }, + ]) for (const eachBot of bot.bots) { eachBot.commandManager.reload(); } diff --git a/src/commands/rtp.js b/src/commands/rtp.js index 527e01f..6736441 100644 --- a/src/commands/rtp.js +++ b/src/commands/rtp.js @@ -6,7 +6,7 @@ module.exports = { trustLevel: 1, aliases:['rtp', 'teleportrandom', 'randomteleport'], usage:[""], - async execute (context) { + execute (context) { const bot = context.bot const sender = context.source.player const source = context.source @@ -15,6 +15,6 @@ module.exports = { const y = 100 const z = between(-1_000_000, 1_000_000) bot.tellraw("@a", `Randomly Teleported: ${sender.profile.name} to x:${x} y:${y} z:${z} `) - bot.core.run(`tp ${sender.uuid} ${x} ${y} ${z}`) + bot.core.run(`minecraft:tp ${sender.profile.name} ${x} ${y} ${z}`) } } diff --git a/src/commands/test.js b/src/commands/test.js index ab0babf..40f134c 100644 --- a/src/commands/test.js +++ b/src/commands/test.js @@ -6,15 +6,40 @@ module.exports = { ], description: 'Make me say something', usages: [ - "" + "error stack ", + "error message ", + "message " ], execute (context) { const bot = context.bot const args = context.arguments; + if (!args && !args[0] && !args[1]) return switch (args[0]) { case 'error': - throw new Error(args.slice(1).join(' ')); - break + switch (args[1]) { + case 'stack': + throw new Error(args.slice(2).join(' ')); + break + case 'message': + throw new CommandError(args.slice(2).join(' ')); + break + } +// throw new Error(args.slice(1).join(' ')); + break; + case "message": + bot.tellraw("@a", [ + { + text: `Hello, World!, Player: ${bot.getMessageAsPrismarine(context.source.player.displayName ?? context.source.player.profile.name)?.toMotd()}§r`, + color: 'gray', + bold: false + }, + { + text: ` Args: ${args.slice(1).join(' ')}`, + color: 'gray', + bold: false, + } + ]) + break; } } } diff --git a/src/commands/website.js b/src/commands/website.js index 90e8db5..83f7a2b 100644 --- a/src/commands/website.js +++ b/src/commands/website.js @@ -32,10 +32,9 @@ module.exports = { }); } else if (args.join(' ').toLowerCase().startsWith('https://')) { https.get(args.join(' '), (res) => { - console.log('statusCode:', res.statusCode); - console.log('headers:', res.headers); res.on('data', (d) => { bot.tellraw("@a", { text: util.inspect(d.toString()), color: "dark_green", }) +// console.log(Object.keys(d.toString().length)); }); }).on('error', (e) => { bot.chat.message(`&4${e.toString()}`); diff --git a/src/commands/xml.js b/src/commands/xml.js index 0d63284..04603aa 100644 --- a/src/commands/xml.js +++ b/src/commands/xml.js @@ -1,8 +1,6 @@ const { parseString } = require('xml2js'); const CommandError = require('../util/command_error') const util = require('util'); -const fs = require('fs'); -const path = require('path'); module.exports = { name: 'xml', trustLevel: 3, @@ -14,20 +12,18 @@ module.exports = { ], execute (context) { const bot = context.bot; - const args = context.arguments -// fs.writeFileSync(path.join(__dirname, '../data/xmlEval.xml'), args.slice(1).join(' ')) - fs.appendFileSync(path.join(__dirname, '../data/xmlEval.xml'), args.slice(1).join(' ')) - parseString(args.slice(1).join(' '), function (err, result) { - if (err) throw new CommandError(err.toString()) - bot.tellraw("@a", [ - { - text: "Result \u203a \n", - color: "gray" - }, - { - text: `${util.inspect(result)}` - } - ]) - }); + const args = context.arguments; + parseString(args.slice(1).join(' '), function (err, result) { + if (err) throw new CommandError(err.toString()) + bot.tellraw("@a", [ + { + text: "Result \u203a \n", + color: "gray" + }, + { + text: `${util.inspect(result)}` + } + ]) + }); } } diff --git a/src/data/bots.json b/src/data/bots.json new file mode 100644 index 0000000..e5c51ae --- /dev/null +++ b/src/data/bots.json @@ -0,0 +1,662 @@ +[ + { + "name": { + "text": "HBot", + "color": "aqua", + "bold": false + }, + "authors": [ + "hhhzzzsss" + ], + "exclaimer": "HBOT HARRYBUTT LMAOOOOOOOOOOOOOOOOO", + "foundation": "java/mcprotocollib", + "prefixes": [ + "#" + ] + }, + { + "name": [ + { + "text": "FBot", + "color": "gold" + } + ], + "authors": [ + "popbob/aaa" + ], + "exclaimer": "", + "foundation": "nodejs/node-minecraft-protocol", + "prefixes": [ + "+" + ] + }, + { + "name": [ + { + "text": "JokerBot", + "color": "green" + } + ], + "authors": [ + "zXzy", + "12alex12" + ], + "exclaimer": "", + "foundation": "nodejs/mineflayer", + "prefixes": [ + "\\" + ] + }, + { + "name": { + "text": "CddehhBot", + "color": "red", + "bold": false + }, + "authors": [ + "CaydennO1", + "spyingcreeper09" + ], + "exclaimer": "WHAT IS THIS GOOFY AAAH FUCKING BOT FUCKING PIECE OF RETARDED ASS SHIT BOT ITS SO FUCKING SHIT I WANNA IPFILTER IT WITH FUCKING CHOMENS", + "foundation": "nodejs/mineflayer", + "prefixes": [ + "," + ] + }, + { + "name": { + "text": "TurtleBot", + "color": "green", + "bold": false + }, + "authors": [ + "TurtleKid" + ], + "exclaimer": "nmp when?", + "foundation": "nodejs/mineflayer", + "prefixes": [ + "\\" + ] + }, + { + "name": { + "text": "NothingBot", + "color": "dark_red", + "bold": false + }, + "authors": [ + "Yaode_owo" + ], + "exclaimer": "uwu", + "foundation": "nodejs/mineflayer", + "prefixes": [ + "?" + ] + }, + { + "name": { + "text": "SC09Bot", + "color": "dark_gray", + "bold": false + }, + "authors": [ + "spyingcreeper09" + ], + "exclaimer": ":3", + "foundation": "nodejs/node-minecraft-protocol", + "prefixes": [ + "@" + ] + }, + { + "name": { + "text": "HorizonBot", + "color": "gold", + "bold": false + }, + "authors": [ + "ZenZoya", + "Yaode_owo", + "Parker2991", + "and others" + ], + "exclaimer": "originally called §5FleamBot§r", + "foundation": "nodejs/node-minecraft-protocol", + "prefixes": [ + "^" + ] + }, + { + "name": { + "text": "64Bot", + "color": "gold", + "bold": false + }, + "authors": [ + "64Will64" + ], + "exclaimer": "NINTENDO 64?!?!??!?! 69Bot when??????", + "foundation": "NodeJS/Mineflayer", + "prefixes": [ + "w=" + ] + }, + { + "name": { + "text": "Nebulabot", + "color": "dark_purple", + "bold": false + }, + "authors": [ + "IuCC" + ], + "exclaimer": "the void", + "foundation": "NodeJS/Node-minecraft-protocol", + "prefixes": [ + "[" + ] + }, + { + "name": [ + { + "text": "Prism", + "color": "#00FF9C", + "bold": true + }, + { + "text": "Bot", + "color": "white", + "bold": true + } + ], + "authors": [ + "IuCC" + ], + "exclaimer": "prismarine :3", + "foundation": "NodeJS/Node-minecraft-protocol", + "prefixes": [ + "[" + ] + }, + { + "name": { + "text": "SharpBot", + "color": "aqua", + "bold": false + }, + "authors": [ + "64Will64" + ], + "exclaimer": "sharp as in the tv? idfk im out of jokes also the first c# bot on the list??", + "foundation": "C#/MineSharp", + "prefixes": [ + "s=" + ] + }, + { + "name": { + "text": "MoonBot", + "color": "red", + "bold": false + }, + "authors": [ + "64Will64" + ], + "exclaimer": "stop mooning/mooing me ", + "foundation": "NodeJS/Mineflayer", + "prefixes": [ + "m=" + ] + }, + { + "name": { + "text": "TableBot", + "color": "yellow", + "bold": false + }, + "authors": [ + "12alex12" + ], + "exclaimer": "TABLE CLOTH BOT?!?! ", + "foundation": "NodeJS/Node-minecraft-protocol", + "prefixes": [ + "t!" + ] + }, + { + "name": [ + { + "text": "Evil", + "color": "dark_red", + "bold": false + }, + { + "text": "Bot", + "color": "dark_purple" + } + ], + "authors": [ + "FusseligerDev" + ], + "exclaimer": "", + "foundation": "Java/Custom", + "prefixes": [ + "!" + ] + }, + { + "name": { + "text": "SBot Java", + "color": "white", + "bold": false + }, + "authors": [ + "evkc" + ], + "foundation": "Java/MCProtocolLib", + "prefixes": [ + ":" + ] + }, + { + "name": { + "text": "SBot Rust", + "color": "white", + "bold": false + }, + "authors": [ + "evkc" + ], + "foundation": "Rust", + "prefixes": [ + "re:" + ] + }, + { + "name": { + "text": "Z-Boy-Bot", + "color": "dark_purple", + "bold": false + }, + "exclaimer": "Most likely skidded along with kbot that the dev used", + "authors": [ + "Romnci" + ], + "foundation": "NodeJS/mineflayer or Java/mcprotocollib idfk", + "prefixes": [ + "Z]" + ] + }, + { + "name": { + "text": "ABot", + "color": "gold", + "bold": true + }, + "exclaimer": "not used anymore (replaced by V2)", + "authors": [ + { + "text": "_yfd", + "color": "light_purple" + } + ], + "foundation": "NodeJS/Node-Minecraft-Protocol", + "prefixes": [ + "<" + ] + }, + { + "name": { + "text": "ABot-V2", + "color": "gold", + "bold": true + }, + "exclaimer": "", + "authors": [ + { + "text": "_yfd", + "color": "light_purple" + } + ], + "foundation": "NodeJS/Node-Minecraft-Protocol", + "prefixes": [ + "<" + ] + }, + { + "name": { + "text": "FardBot", + "color": "light_purple", + "bold": false + }, + "authors": [ + "_yfd" + ], + "exclaimer": "bot is dead lol", + "foundation": "NodeJS/Mineflayer", + "prefixes": [ + "<" + ] + }, + { + "name": { + "text": "ChipmunkBot Java", + "color": "green", + "bold": false + }, + "authors": [ + "_ChipMC_" + ], + "exclaimer": "chips? also shoutout to chip and chayapak for helping in the rewrite", + "foundation": "Java/MCProtocolLib", + "prefixes": [ + "'", + "/'" + ] + }, + { + "name": { + "text": "ChipmunkBot NodeJS", + "color": "green", + "bold": false + }, + "authors": [ + "_ChipMC_" + ], + "foundation": "NodeJS/Node-Minecraft-Protocol" + }, + { + "name": { + "text": "TestBot", + "color": "aqua", + "bold": false + }, + "authors": [ + "Blackilykat" + ], + "foundation": "Java/MCProtocolLib", + "prefixes": [ + "-" + ] + }, + { + "name": { + "text": "UBot", + "color": "gray", + "bold": false + }, + "authors": [ + "HexWoman" + ], + "exclaimer": "UwU OwO", + "foundation": "NodeJS/node-minecraft-protocol", + "prefixes": [ + "\"" + ] + }, + { + "name": { + "text": "ChomeNS Bot Java", + "color": "yellow", + "bold": false + }, + "authors": [ + "chayapak" + ], + "exclaimer": "wow its my bot !! ! 4374621q43567%^&#%67868-- chayapak \n rip ChomeNS bot i wonder what chayapak is currently doing -- Parker2991", + "foundation": "Java/MCProtocolLib", + "prefixes": [ + "*", + "cbot ", + "/cbot " + ] + }, + { + "name": { + "text": "ChomeNS Bot NodeJS", + "color": "yellow", + "bold": false + }, + "authors": [ + "chayapak" + ], + "foundation": "NodeJS/Node-Minecraft-Protocol", + "prefixes": [ + "*", + "cbot", + "/cbot" + ] + }, + { + "name": { + "text": "RecycleBot", + "color": "dark_green", + "bold": false + }, + "foundation": [ + "MorganAnkan" + ], + "exclaimer": "nice bot", + "language": "NodeJS/node-minecraft-protocol", + "prefixes": [ + "=" + ] + }, + { + "name": { + "text": "neobot", + "color": "blue", + "bold": false + }, + "exclaimer": "n e o b o t ;oslkdfj;salkdfj;ladsjf", + "authors": [ + "mirkokral" + ], + "foundation": "java/MCProtocolLib", + "prefixes": [ + "_" + ] + }, + { + "name": { + "text": "ManBot", + "color": "dark_green", + "bold": false + }, + "exclaimer": "(more like men bot :skull:) OH HAAAAAAAAAAAAAAIIILL LOGINTIMEDOUT", + "authors": [ + "Man/LogintimedOut" + ], + "foundation": "NodeJS/mineflayer", + "prefixes": [ + "(Note:I dont remember!!)" + ] + }, + { + "name": [ + { + "text": "Useless", + "color": "red", + "bold": false + }, + { + "text": "Bot", + "color": "gray", + "bold": false + } + ], + "exclaimer": "it isnt useless its a good bot................", + "authors": [ + "IuCC" + ], + "foundation": "NodeJS/node-minecraft-protocol", + "prefixes": [ + "[" + ] + }, + { + "name": [ + { + "text": "SnifferBot", + "color": "gold", + "bold": false + } + ], + "exclaimer": "sniff sniff FNFBoyfriendBot simp", + "authors": [ + "popbob/aaa" + ], + "foundation": "NodeJS/Node-minecraft-protocol", + "prefixes": [ + ">" + ] + }, + { + "name": [ + { + "text": "XBot", + "color": "dark_purple", + "bold": false + } + ], + "exclaimer": "", + "authors": [ + "popbob/aaa" + ], + "foundation": "ts-Node/Node-minecraft-protocol", + "prefixes": [ + "$" + ] + }, + { + "name": [ + { + "text": "Kitty", + "color": "gold", + "bold": false + }, + { + "text": "Corp", + "color": "aqua", + "bold": false + }, + { + "text": "Bot", + "color": "yellow", + "bold": false + } + ], + "exclaimer": "3 words ginlang is gay", + "authors": [ + "ginlang , G6_, ArrayBuffer, and i guess more??" + ], + "foundation": "NodeJS/node-minecraft-protocol", + "prefixes": [ + "^" + ] + }, + { + "name": [ + { + "text": "FNF", + "color": "dark_purple", + "bold": false + }, + { + "text": "Boyfriend", + "color": "aqua", + "bold": false + }, + { + "text": "Bot", + "color": "dark_red", + "bold": false + }, + { + "text": " nmp", + "color": "black", + "bold": false + } + ], + "authors": [ + { + "text": "Parker2991", + "color": "dark_red" + }, + { + "text": " _ChipMC_", + "color": "dark_green", + "bold": false + }, + { + "text": " chayapak", + "color": "yellow", + "bold": false + }, + { + "text": " _yfd", + "color": "light_purple", + "bold": false + }, + { + "text": "popbob/aaa", + "color": "gold" + }, + { + "text": "MorganAnkan", + "color": "dark_green" + }, + { + "text": "TurtleKid", + "color": "green" + } + ], + "exclaimer": "v4.0x - current", + "foundation": "NodeJS/node-minecraft-protocol", + "prefixes": [ + "~", + "fnfbfbot ", + "", + "‮", + "█" + ] + }, + { + "name": [ + { + "text": "FNF", + "color": "dark_purple", + "bold": false + }, + { + "text": "Boyfriend", + "color": "aqua", + "bold": false + }, + { + "text": "Bot", + "color": "dark_red", + "bold": false + }, + { + "text": " legacy", + "color": "green", + "bold": false + } + ], + "authors": [ + { + "text": "Parker2991", + "color": "dark_red" + }, + { + "text": " _ChipMC_", + "color": "dark_green", + "bold": false + } + ], + "exclaimer": "1037 LINES OF CODE WTFARD!??! also this version is in console commands only", + "foundation": "NodeJS/mineflayer", + "prefixes": [] + } +] diff --git a/src/data/xmlEval.xml b/src/data/xmlEval.xml deleted file mode 100644 index a592e91..0000000 --- a/src/data/xmlEval.xml +++ /dev/null @@ -1,2 +0,0 @@ - - sex sex sex sus sex sex<><>hello :3mewogex \ No newline at end of file diff --git a/src/index.js b/src/index.js index 9eef9b5..aebcfe8 100644 --- a/src/index.js +++ b/src/index.js @@ -23,7 +23,6 @@ try { const rl = readline.createInterface({ input: process.stdin, output: process.stdout, -// prompt: `Boot success! type ${config.console.prefix}help for a list of commands` }) if (config.discord.enabled) discordClient.login(config.discord.token); const bots = []; @@ -34,3 +33,10 @@ for (const options of config.bots) { loadModules(bot, options, config, discordClient); bot.console.useReadlineInterface(rl); } +/*config.bots.filter((options) => { + const bot = createBot(options, config); + bots.push(bot); + bot.bots = bots; + loadModules(bot, options, config, discordClient); + bot.console.useReadlineInterface(rl); +})*/ diff --git a/src/modules/chat.js b/src/modules/chat.js index a61352e..a67ed5b 100644 --- a/src/modules/chat.js +++ b/src/modules/chat.js @@ -39,6 +39,12 @@ function chat (bot, options, config) { if (packet.type === 3) bot.emit('message', bot.getMessageAsPrismarine({"translate":"commands.message.display.outgoing","with":[`${translateUsername}`,`${translateMessage}`],"color":"gray","italic":true})?.toMotd()) if (packet.type === 4) bot.emit('message', message); if (packet.type === 5) bot.emit('message', bot.getMessageAsPrismarine({translate:"chat.type.announcement",color:'white', with:[`${translateUsername}`,`${translateMessage}`]})?.toMotd()) +/* switch (packet.type) { + case "4": + bot.emit('message', message) +// console.log('packet type 4'); + break + }*/ tryParsingMessage(message, { senderName: sender, players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine }) }) @@ -54,9 +60,9 @@ function chat (bot, options, config) { bot.on('packet.system_chat', packet => { const message = tryParse(packet.content) - - if (message.translate === 'advMode.setCommand.success') return // Ignores command set message - + if (config.commandSetMessage) { + if (message.translate === 'advMode.setCommand.success') return // Ignores command set message + } bot.emit('system_chat', { message, actionbar: packet.isActionBar }) if (packet.isActionBar) { @@ -88,22 +94,6 @@ function chat (bot, options, config) { return undefined } -/* - bot.chat = message => { - const acc = 0 - const bitset = Buffer.allocUnsafe(3) - bitset[0] = acc & 0xFF - bitset[1] = (acc >> 8) & 0xFF - bitset[2] = (acc >> 16) & 0xFF - bot._client.write('chat_message', { - message, - timestamp: BigInt(Date.now()), - salt: 0n, - offset: 0, - acknowledged: bitset - }) - } -*/ bot.chat = { message: message => { const acc = 0; @@ -122,7 +112,6 @@ function chat (bot, options, config) { command: command => { bot._client.write('chat_command', { command: command?.substring(0, 256), - timestamp: BigInt(Date.now()), salt: 0n, argumentSignatures: [], @@ -133,22 +122,5 @@ function chat (bot, options, config) { }) } } -// console.log(bot.chat.sendMessage) -/* - bot.command = command => { - bot._client.write('chat_command', { - command, - timestamp: BigInt(Date.now()), - salt: 0n, - argumentSignatures: [], - signedPreview: false, - messageCount: 0, - acknowledged: Buffer.alloc(3), - previousMessages: [] - }) - } -*/ -// bot.tellraw = (message, selector = '@a') => bot.core.run('minecraft:tellraw @a ' + JSON.stringify(message)) // ? Should this be here? } - module.exports = chat; diff --git a/src/modules/command_core.js b/src/modules/command_core.js index aba6ccf..b08b777 100644 --- a/src/modules/command_core.js +++ b/src/modules/command_core.js @@ -12,6 +12,8 @@ function core (bot, options, config) { if (!pos) return if (bot.options.useChat ?? bot.options.isCreayun ?? bot.options.isSavage) return + // if (isNaN(pos.x + start.x)) bot.chat.command('world 3'); + // console.log(isNaN(pos.x + start.x)) bot.chat.command(`minecraft:fill ${pos.x + start.x} ${pos.y + start.y} ${pos.z + start.z} ${pos.x + end.x} ${pos.y + end.y} ${pos.z + end.z} repeating_command_block{CustomName:'${JSON.stringify(config.core.name)}'}`) }, diff --git a/src/modules/command_manager.js b/src/modules/command_manager.js index 78ab73b..817f639 100644 --- a/src/modules/command_manager.js +++ b/src/modules/command_manager.js @@ -91,6 +91,7 @@ function command_manager (bot, options, config, discordClient) { } } catch (error) { console.error(error) + bot?.console?.filelogging(error.stack); if (source?.sources?.discord && !source?.sources?.console) { const Embed = new EmbedBuilder() .setColor(`${config.colors.discord.error}`) @@ -104,7 +105,7 @@ function command_manager (bot, options, config, discordClient) { } else if (!source?.sources?.discord && !source?.sources?.console) { if (error instanceof CommandError) bot.tellraw("@a", { text: error.message, color: "dark_red" }) - else bot.tellraw("@a", bot.getMessageAsPrismarine({ translate: 'command.failed', color: "dark_red", hoverEvent: { action: 'show_text', contents: `${error.stack}` } })?.toMotd(bot.registry.language)) + else bot.tellraw("@a", [{ translate: 'command.failed', color: "dark_red", hoverEvent: { action: 'show_text', contents: `${error.stack}` } }]) } } }, @@ -146,6 +147,7 @@ function command_manager (bot, options, config, discordClient) { bot.commandManager.commandlist.push(command) } catch (error) { console.error('Failed to load command', filename, ':', error) + bot?.console.filelogging(error.stack) } } let ratelimit = 0; @@ -169,22 +171,25 @@ function command_manager (bot, options, config, discordClient) { }) }) bot.commandManager.reload = function () { - commandlist = []; - bot.commandManager.unregister(); - bot.commandManager.commandlist = []; + //commandlist = []; +// bot.commandManager.unregister(); +// bot.commandManager.commandlist = []; for (const filename of fs.readdirSync(path.join(__dirname, "../commands"))) { try { - delete require.cache[require.resolve(path.join(__dirname, "../commands", filename))] - const command = require(path.join(__dirname, "../commands", filename)); -// bot.commandManager.unregister(command); -// this.commands = {}; + // bot.commandManager.unregister(); + delete require.cache[require.resolve(path.join(__dirname, "../commands/", filename))] + const command = require(path.join(__dirname, "../commands/", filename)); +// bot.commandManager.unregister(); + // delete require.cache[require.resolve(path.join(__dirname, "../commands", filename))] +// bot.commandManager.register(command); +// bot.commandManager.commandlist.push(command); bot.commandManager.register(command); -// bot.commandManager.commandlist.pop(command); - // bot.commandManager.register(command); + bot.commandManager.commandlist.pop(command) bot.commandManager.commandlist.push(command) } catch (error) { - bot.console.error(["Failed to load File ", filename, ":", error.stack]) +// bot.console.error(["Failed to load File ", filename, ":", error.stack]) bot.tellraw("@a", { text: `Failed to reload file ${filename}\n${error.stack}`, color: "red" }) + bot?.console?.filelogger(error.stack); } } } diff --git a/src/modules/console.js b/src/modules/console.js index 9146950..beda220 100644 --- a/src/modules/console.js +++ b/src/modules/console.js @@ -9,9 +9,9 @@ function CommandConsole (bot, options, config) { rl.on('line', line => { if (bot.options.serverName !== this.consoleServer && this.consoleServer !== 'all') return if (line.startsWith(config.console.prefix)) { - return bot.commandManager.executeString(bot.console.source, line.substring(2)) + return bot.commandManager.executeString(bot.console.source, line.substring(config.console.prefix.length)) } if (line.startsWith("")) { - return bot.commandManager.executeString(bot.console.source, `echo ${line.substring(0)}`) + return bot.commandManager.executeString(bot.console.source, `console say ${line.substring(0)}`) } }) @@ -43,6 +43,34 @@ function CommandConsole (bot, options, config) { bot.console.error = function (message) { console.log(ChatMessage.fromNotch(`§8[§1${new Date().toLocaleTimeString("en-US", { timeZone: "America/CHICAGO", })} §3${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO", })} §4error§8] §8[${options.serverName}§8] `)?.toAnsi() + message) } + bot.console.customChat = { + enabled: false, + chat (message) { + const prefix = { + translate: '[%s] %s \u203a %s', + color:'dark_gray', + with: [ + { + text: 'FNFBoyfriendBot Console', + color:'#00FFFF' + }, + { + selector: `${bot.username}`, color:'#00FFFF', + clickEvent: { action: 'suggest_command', value: '~help' } + }, + { + text: '', + extra: [`${message}`], + color:'white' + }, + ], + hoverEvent: { action:"show_text", value: 'FNF Sky is a fangirl but a simp for boyfriend confirmed??'}, + clickEvent: 'https://doin-your.mom' ? + { action: 'open_url', value: 'https://doin-your.mom' } : undefined, + } + bot.tellraw('@a', prefix) + } + } bot.on('message', message => { const ansi = bot.getMessageAsPrismarine(message)?.toAnsi(bot.registry.language).replaceAll('BlackStone Mafia On Top!', "Fuck off you god damn cunt") const string = bot.getMessageAsPrismarine(message)?.toString(bot.registry.language).replaceAll('BlackStone Mafia On Top!', "Fuck off you god damn cunt") diff --git a/src/modules/discord.js b/src/modules/discord.js index 703d3b2..92dd16b 100644 --- a/src/modules/discord.js +++ b/src/modules/discord.js @@ -53,7 +53,7 @@ function discord(bot, options, config, discordClient) { function sendComponent(message) { const ansi = bot.getMessageAsPrismarine(message)?.toAnsi(bot.registry.language).replaceAll('```\u001b[9```' + '```\u001b[3```').replaceAll('https://discord','https:\rdiscord')?.replaceAll('discord.gg', 'discord.\rgg').replaceAll('BlackStone Mafia On Top!', "Fuck off you god damn cunt"); try { - sendDiscordMessage(fixansi(ansi.replaceAll('`', '`\u200b'))) + sendDiscordMessage(fixansi(ansi?.replaceAll('`', '`\u200b'))) } catch (e) { bot.console.error(`Error sending a message to Discord:\n${e.message}`) sendDiscordMessage(e.message) diff --git a/src/modules/logger.js b/src/modules/logger.js index c7e9e43..380eb88 100644 --- a/src/modules/logger.js +++ b/src/modules/logger.js @@ -15,15 +15,6 @@ function consolefilelogger(bot, options, message) { if (!fs.existsSync(path.join(__dirname, "../../logs"))) { fs.mkdirSync(path.join(__dirname, "../../logs")) } -/* -const { - createReadStream, - createWriteStream, -} = require('node:fs'); -*/ -// if (!bot.Console.filelogging) return; -// ${new Date().toLocaleTimeString("en-US", { timeZone: "America/CHICAGO", })} -// if (new Date().toLocaleTimeString("en-US", { timeZone: "America/CHICAGO", }) === "10:45:00 PM") process.exit("daily reset"); try { if (!fs.existsSync(logFolder)) { fs.mkdirSync(logFolder); @@ -60,38 +51,10 @@ const { newFileName = path.join(logFolder, `${name}.log.gz`); counter++; } - // if (plainName !== timestamp) { compressFile(logFilePath, newFileName); - // } } - - // console?.info( - // `File logging: ${bot.Console.filelogging ? "enabled" : "disabled"}` - // ); -// if (!bot.Console.filelogging) return; // instead of using bot why not just use options cause you already defined it - - // if (toFile) logStream.write(toWrite + '\n'); - bot.console.filelogging = function logging (message) { - logStream.write(message + "\n"); // toFile is not defined + logStream.write(message + "\n"); }; -// console.log(process.stdin.setEncoding('utf-8')) } - -/* -const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout, -}); - -*/ module.exports = consolefilelogger; -/* -child.stdin.setEncoding('utf-8'); -child.stdout.pipe(process.stdout); - -child.stdin.write("console.log('Hello from PhantomJS')\n"); - -child.stdin.end(); -*/ - diff --git a/src/modules/selfcare.js b/src/modules/selfcare.js index fb71dad..808c23a 100644 --- a/src/modules/selfcare.js +++ b/src/modules/selfcare.js @@ -33,6 +33,8 @@ function selfcare (bot, options, config) { } else if (stringMessage?.startsWith("Successfully set your username to ")) username = true else if (stringMessage === `You already have the username "${bot.username}"`) username = false + else if (stringMessage === `You no longer have a nickname.`) nickname = false; + else if (stringMessage.startsWith('Your nickname is now ')) nickname = true; }) bot.on('packet.entity_status', packet => { if (packet.entityId !== entityId || packet.entityStatus < 24 || packet.entityStatus > 28) return @@ -43,34 +45,31 @@ function selfcare (bot, options, config) { gameMode = packet.gameMode; }); bot.on("packet.game_state.change", packet => { - if (packet.reason !== 4) return // checks if the client is locked + if (packet.reason !== 4) return // checks if the bot is seeing the endcredits or died clientLock = packet.gameMode; }) let timer; bot.on('packet.login', (packet) => { - entityId = packet.entityId; - gameMode = packet.gameMode; - clientLock = packet.gameMode; -// console.log(packet.gameMode); - timer = setInterval(() => { - if (bot.options.isSavage && !bot.options.isKaboom) { - if (clientLock !== 4) bot._client.write("client_command", { actionId: 0 }); - } else if (bot.options.isKaboom && !bot.options.isSavage) { - if (permissionLevel < 2) bot.chat.command('op @s[type=player]'); - else if (gameMode !== 1) bot.chat.command('gamemode creative @s[type=player]'); - else if (!commandSpy) bot.chat.command('commandspy on'); - else if (username) bot.chat.command(`username ${bot.options.username}`) - else if (!prefix) bot.chat.command(`prefix &8[&bPrefix&8: &3${config.prefixes[0]}&8]`); - else if (!vanished) bot.core.run(`vanish ${bot.options.username} on`); - else if (unmuted) bot.core.run(`essentials:mute ${bot.uuid}`); - else if (!god) bot.core.run(`god ${bot.options.username} enable`); - else if (!teleportToggle) bot.core.run(`tptoggle ${bot.options.username} disable`); - else if (clientLock !== 4) bot._client.write("client_command", { actionId: 0 }); -// else if (username) bot.chat.command(`username ${bot.options.username}`) -// else if (unmuted) bot.chat.command(`mute ${bot.options.username} 0s`); -// else if (unmuted) bot.core.run(`/essentials:mute ${bot.options.username}`); - } - }, 1000); + entityId = packet.entityId; + gameMode = packet.gameMode; + clientLock = packet.gameMode; + timer = setInterval(() => { + if (bot.options.isSavage && !bot.options.isKaboom) { + if (clientLock !== 4) bot._client.write("client_command", { actionId: 0 }); + } else if (bot.options.isKaboom && !bot.options.isSavage) { + if (permissionLevel < 2) bot.chat.command('op @s[type=player]'); + else if (gameMode !== 1) bot.chat.command('gamemode creative @s[type=player]'); + else if (!commandSpy) bot.chat.command('commandspy on'); + else if (username) bot.chat.command(`username ${bot.options.username}`) + else if (nickname) bot.chat.command(`nick off`) + else if (!prefix) bot.chat.command(`prefix &8[&bPrefix&8: &3${config.prefixes[0]}&8]`); + else if (!vanished) bot.core.run(`vanish ${bot.options.username} on`); + else if (unmuted) bot.core.run(`essentials:mute ${bot.uuid}`); + else if (!god) bot.core.run(`god ${bot.options.username} enable`); + else if (!teleportToggle) bot.core.run(`tptoggle ${bot.options.username} disable`); + else if (clientLock !== 4) bot._client.write("client_command", { actionId: 0 }); + } + }, 1000); }); bot.on('end', () => { if (timer) clearInterval(timer) diff --git a/src/util/command_error.js b/src/util/command_error.js index 551c58a..de12caf 100644 --- a/src/util/command_error.js +++ b/src/util/command_error.js @@ -1,5 +1,5 @@ // TODO: Improve how messages are stringified -const ChatMessage = require('prismarine-chat')('1.20.1') +const ChatMessage = require('prismarine-chat')('1.20.2') const stringify = message => new ChatMessage(message).toString() class CommandError extends Error { diff --git a/src/util/command_source.js b/src/util/command_source.js index 4ec2b90..ccc41d7 100644 --- a/src/util/command_source.js +++ b/src/util/command_source.js @@ -3,12 +3,5 @@ class CommandSource { this.player = player; this.sources = sources; } -/* sendFeedback () {} - - sendError (message) { - this.sendFeedback([{ text: '', color: 'dark_red' }, message], false) - }*/ - } - module.exports = CommandSource diff --git a/src/util/loadModules.js b/src/util/loadModules.js index 96b7a4f..0c2d4f2 100644 --- a/src/util/loadModules.js +++ b/src/util/loadModules.js @@ -1,6 +1,6 @@ const fs = require("fs"); const path = require("path"); -const readline = require("readline"); +//const readline = require("readline"); function loadModules (bot, options, config, discordClient) { bot.loadModule = module => module(bot, options, config, discordClient)