commit 2d49c8003f8df376e01cb66dec31b30ac88c9144 Author: Parker2991 Date: Sun Jul 7 15:44:16 2024 -0400 v6.0.0-alpha diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d5142bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules +config.yml +.git +src/modules/exploits.js diff --git a/Changelog.md b/Changelog.md new file mode 100644 index 0000000..ffc2c9b --- /dev/null +++ b/Changelog.md @@ -0,0 +1,80 @@ +beta 0.1 - 0.2 0.5 release 2022 (first release) +ParkerBot/DEMONBOT/Woomybot/Boyfriend + ehh nothing much just the release of the betas +-------------------------------------- +beta 1.0 release 1/25/23 codename: in console test. +original commands:!cloop bcraw,!cloop sudo,!troll,!say,!op (broke),!deop (broke), !gms (broke),!freeze,!icu <--- these commands no longer can be used in game but in console for beta 1.0 +commands added: fake kick,ban,kick,crashserver,stop,gmc,greetin,test(broken idk),bypass,entity spam(broken idk),gms(broke),stop,tntspam (broke idk),prefix (not tested yet),annoy (broke results in a complete server crash keeping ayunboom down for 3 to 5 hours),freeze(i dont even know what this do since i cant do !freeze),crashserver,troll(more destructive),trol(more destructive),icu(broke idk),say,sudo,cloop +------------------------------------- +1.0 release 1/26/23 1:47am codename: +FNFBoyfriendBot. +commands added: BOOM,deop,troll and trol(added extra code to both commands),kaboom,serverdeop, +commands fixed:tp,gms,annoy(attemps to crash the server but not as bad as it was) +commands untested:prefix +command Broke:icu,freeze,tntspam,entityspam,tntspam? +changed name to &b &lFNFBoyfriendBot may change later idk + ------------------------------------- +1.0 revision 1 release 1/26/23 2:00pm +codename revision 1. +reworked the kaboom command and fixed the description commands but thats about it. also reworked the greeting command +-------------------------------------- +1.1 release 1/28/23 1:51 +nothing much just added extra stuff to the troll, trol and that is about it +------------------------------------- +1.2 release 1/30/32 no codename +for ppl me making me really mad -.- got released early +-------------------------------------- + + +2.0 2/07/23 8:01pm codename: Major +added DREAMSTANALERT,technoblade,GODSWORD,KFC,MYLEG,OHHAIL,altcrash,MyHead +Reworked tntspam,entityspam,soundbreaker +added Spim to the whitelist of the bot +released too early than it was planned gonna be released due do the code almost leaked it had to be released early +-------------------------------------- + + +2.1 release 2/11/23 5:30pm +added: refillcore(had early prototypes of this was original), vanish,deop,cloopdeop,mute,cloopmute +reworked: op (supposed to already op the bot but didnt work until this release) and reworked gmc (same problem with op) +(had early prototypes of vanish,refillcore,gmc,and op but these were original gonna be automatic but after alot of attempts i said screw it and added 2 commands refillcore, and vanish reworked gmc and op and got them working finally) removed Spim because come to find out he couldnt be trusted +-------------------------------------- +2.2 release 2/20/23 4:21pm central time +bug fixes +added ckill(added back after trial and error),serversuicidal +changed username of the bot from hex code to FNFBoyfriendBot because hex code for the username was confusing as it changes everytime +--------------------------------------- + 3.0 Beta codename: blue-balled corruption +was canceled due to ayunboom being rewriten and renamed to creayun barely usable on there because commands blocks are disabled which i created a bot for that server that has no command blocks https://replit.com/@Parker2991/FNFBoyfriendbotcreayun-bot-final-build#index.js just finished the final build of that bot due to chip announcing that he may make a kaboom clone yk what 1.5.2 and 1.8 support but anyway onto what is in the 3.0 beta well the beta for right now +commands added:discord,version,online,list,iownyou,endmysuffering,wafflehouse,whopper,bcraw,destroycore +Notes:the original say command was reworked into talking in chat without bcraw and command blocks which the bcraw chatting code is still in the bot but was reworked into the bcraw commmand. maybe some commands removed? i dont know yet edit there is 2 commands removed +commands removed:tpe and serverdeop??? +reworked commands :say command for right now +relay chat mabe will be added as a seperate repl i dont know yet possible would need a whole code rewrite for relay chat +----------------------------------------- +3.0 full release CodeName:Sky Remanifested +the full release of 3.0 the rewrite has been pushed back to 4.0 due to 3.0 already pass its release date and the code i had on hand was done but the rewrite wasnt done +Added: SelfCare +Made during development:Relay chat prototypes for several servers +--------------------- +3.0.5 release +Bug fixes +----------- +3.0.9 +commands added:Help(finally added after about a year),consolelog(added cuz yes),cloopconsolelog(added cuz yes) +------------------- +4.0 beta Codename:FNFBoyfriendBot Ultimate +all of the command removed and or rewriten from version 3.0.9 +Commands added or rewriten:ban,buyrealminecraft,cloop,discord,echo,errortest,freeze,help,icu,info,kick,bots,skids,romncitrash,say,selfdestruct,serversuicidal,sudo,test,trol,troll +(note that this is different and is not CommandModules)Modules Added:discord,chat,chat_command_handler,command_manager,position,registry,reconnect,command_core +CustomChats added:kaboom(for normal chat) +(note that this is different and is not Modules)CommandModules Added:command_error,Command_source +a beta release for rn +----------------------------- +4.0 Alpha Codename:FNFBoyfriendBot Ulitmate +Commands added: calculator,ckill,evaljs,urban,crash,cloopcrash,core,list,ping,netmsg,skin,tpr +Commands Removed:Buyrealminecraft +(note that this is different and is not CommandModules)Modules Added:op selfcare,gmc selfcare,vanish selfcare,cspy selfcare,console +(note that this is different and is not Modules)CustomChats Added:u2O3a(for custom chat) +added util with between(for urban) eval_colors(for evaljs) +---------------------------------- \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..984a4cb --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1960 @@ +{ + "name": "FNFBoyfriendBot-v6.0.0", + "lockfileVersion": 2, + "requires": true, + "FNFBoyfriendBot-nmp-version": "0.5", + "packages": { + "": { + "dependencies": { + "discord.js": "^14.11.0", + "js-yaml": "^4.1.0", + "jvm": "^0.5.3", + "man-db": "^1.0.3", + "minecraft-data": "^3.36.1", + "minecraft-protocol": "^1.47.0", + "prismarine-auth": "^2.2.0", + "prismarine-chat": "^1.10.1", + "prismarine-registry": "^1.7.0" + } + }, + "node_modules/@azure/msal-common": { + "version": "14.12.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.12.0.tgz", + "integrity": "sha512-IDDXmzfdwmDkv4SSmMEyAniJf6fDu3FJ7ncOjlxkDuT85uSnLEhZi3fGZpoR7T4XZpOMx9teM9GXBgrfJgyeBw==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@azure/msal-node": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.9.2.tgz", + "integrity": "sha512-8tvi6Cos3m+0KmRbPjgkySXi+UQU/QiuVRFnrxIwt5xZlEEFa69O04RTaNESGgImyBBlYbo2mfE8/U8Bbdk1WQ==", + "dependencies": { + "@azure/msal-common": "14.12.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@discordjs/builders": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.3.tgz", + "integrity": "sha512-CTCh8NqED3iecTNuiz49mwSsrc2iQb4d0MjMdmS/8pb69Y4IlzJ/DIy/p5GFlgOrFbNO2WzMHkWKQSiJ3VNXaw==", + "dependencies": { + "@discordjs/formatters": "^0.3.1", + "@discordjs/util": "^0.3.1", + "@sapphire/shapeshift": "^3.8.2", + "discord-api-types": "^0.37.41", + "fast-deep-equal": "^3.1.3", + "ts-mixer": "^6.0.3", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/@discordjs/collection": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.1.tgz", + "integrity": "sha512-aWEc9DCf3TMDe9iaJoOnO2+JVAjeRNuRxPZQA6GVvBf+Z3gqUuWYBy2NWh4+5CLYq5uoc3MOvUQ5H5m8CJBqOA==", + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/@discordjs/formatters": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.1.tgz", + "integrity": "sha512-M7X4IGiSeh4znwcRGcs+49B5tBkNDn4k5bmhxJDAUhRxRHTiFAOTVUNQ6yAKySu5jZTnCbSvTYHW3w0rAzV1MA==", + "dependencies": { + "discord-api-types": "^0.37.41" + }, + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/@discordjs/rest": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.7.1.tgz", + "integrity": "sha512-Ofa9UqT0U45G/eX86cURQnX7gzOJLG2oC28VhIk/G6IliYgQF7jFByBJEykPSHE4MxPhqCleYvmsrtfKh1nYmQ==", + "dependencies": { + "@discordjs/collection": "^1.5.1", + "@discordjs/util": "^0.3.0", + "@sapphire/async-queue": "^1.5.0", + "@sapphire/snowflake": "^3.4.2", + "discord-api-types": "^0.37.41", + "file-type": "^18.3.0", + "tslib": "^2.5.0", + "undici": "^5.22.0" + }, + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/@discordjs/util": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.3.1.tgz", + "integrity": "sha512-HxXKYKg7vohx2/OupUN/4Sd02Ev3PBJ5q0gtjdcvXb0ErCva8jNHWfe/v5sU3UKjIB/uxOhc+TDOnhqffj9pRA==", + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/@discordjs/ws": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-0.8.3.tgz", + "integrity": "sha512-hcYtppanjHecbdNyCKQNH2I4RP9UrphDgmRgLYrATEQF1oo4sYSve7ZmGsBEXSzH72MO2tBPdWSThunbxUVk0g==", + "dependencies": { + "@discordjs/collection": "^1.5.1", + "@discordjs/rest": "^1.7.1", + "@discordjs/util": "^0.3.1", + "@sapphire/async-queue": "^1.5.0", + "@types/ws": "^8.5.4", + "@vladfrangu/async_event_emitter": "^2.2.1", + "discord-api-types": "^0.37.41", + "tslib": "^2.5.0", + "ws": "^8.13.0" + }, + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@sapphire/async-queue": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", + "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@sapphire/shapeshift": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.0.tgz", + "integrity": "sha512-iJpHmjAdwX9aSL6MvFpVyo+tkokDtInmSjoJHbz/k4VJfnim3DjvG0hgGEKWtWZgCu45RaLgcoNgR1fCPdIz3w==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@sapphire/snowflake": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz", + "integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" + }, + "node_modules/@types/node": { + "version": "20.1.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.3.tgz", + "integrity": "sha512-NP2yfZpgmf2eDRPmgGq+fjGjSwFgYbihA8/gK+ey23qT9RkxsgNTZvGOEpXgzIGqesTYkElELLgtKoMQTys5vA==" + }, + "node_modules/@types/readable-stream": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.14.tgz", + "integrity": "sha512-xZn/AuUbCMShGsqH/ehZtGDwQtbx00M9rZ2ENLe4tOjFZ/JFeWMhEZkk2fEe1jAUqqEAURIkFJ7Az/go8mM1/w==", + "dependencies": { + "@types/node": "*", + "safe-buffer": "~5.1.1" + } + }, + "node_modules/@types/ws": { + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@vladfrangu/async_event_emitter": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz", + "integrity": "sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@xboxreplay/errors": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@xboxreplay/errors/-/errors-0.1.0.tgz", + "integrity": "sha512-Tgz1d/OIPDWPeyOvuL5+aai5VCcqObhPnlI3skQuf80GVF3k1I0lPCnGC+8Cm5PV9aLBT5m8qPcJoIUQ2U4y9g==" + }, + "node_modules/@xboxreplay/xboxlive-auth": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@xboxreplay/xboxlive-auth/-/xboxlive-auth-3.3.3.tgz", + "integrity": "sha512-j0AU8pW10LM8O68CTZ5QHnvOjSsnPICy0oQcP7zyM7eWkDQ/InkiQiirQKsPn1XRYDl4ccNu0WM582s3UKwcBg==", + "dependencies": { + "@xboxreplay/errors": "^0.1.0", + "axios": "^0.21.1" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", + "engines": { + "node": ">=0.3.0" + } + }, + "node_modules/aes-js": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha512-6i37w/+EhlWlGUJff3T/Q8u1RGmP5wgbiwYnOnbOqvtrPxT63/sYFyP9RcpxtxGymtfA075IvmOnL7ycNOWl3w==" + }, + "node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/binary-parser": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/binary-parser/-/binary-parser-1.9.2.tgz", + "integrity": "sha512-aQvTapiRIV/x7bAaR2KT3Ptyjff4R8i1zxljgw/Je2kUt0babNPUdtuo7AKN4CWklyzPK4u5e99Z9/3Ib03u9w==", + "dependencies": { + "fast-text-encoding": "^1.0.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", + "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==", + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "node_modules/cjson": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cjson/-/cjson-0.5.0.tgz", + "integrity": "sha512-D3CKJU9YnZNyerUQ1IzNUvMnToP3MGC2XbIAPi/7yqunJJW3rBwCVapousoFtaR9IbejeEM0KIshxC1n4HQcXw==", + "dependencies": { + "json-parse-helpfulerror": "^1.0.3" + }, + "engines": { + "node": ">= 0.3.0" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/discontinuous-range": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", + "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==" + }, + "node_modules/discord-api-types": { + "version": "0.37.42", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.42.tgz", + "integrity": "sha512-1Huaj9cQ1W7/uryS8MZs/tZemnoKB94thM1cE40lep3rpU3q7WHqkdjN/veX0prTkYlPhcyLd/DeF/pBO8X8oQ==" + }, + "node_modules/discord.js": { + "version": "14.11.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.11.0.tgz", + "integrity": "sha512-CkueWYFQ28U38YPR8HgsBR/QT35oPpMbEsTNM30Fs8loBIhnA4s70AwQEoy6JvLcpWWJO7GY0y2BUzZmuBMepQ==", + "dependencies": { + "@discordjs/builders": "^1.6.3", + "@discordjs/collection": "^1.5.1", + "@discordjs/formatters": "^0.3.1", + "@discordjs/rest": "^1.7.1", + "@discordjs/util": "^0.3.1", + "@discordjs/ws": "^0.8.3", + "@sapphire/snowflake": "^3.4.2", + "@types/ws": "^8.5.4", + "discord-api-types": "^0.37.41", + "fast-deep-equal": "^3.1.3", + "lodash.snakecase": "^4.1.1", + "tslib": "^2.5.0", + "undici": "^5.22.0", + "ws": "^8.13.0" + }, + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/endian-toggle": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/endian-toggle/-/endian-toggle-0.0.0.tgz", + "integrity": "sha512-ShfqhXeHRE4TmggSlHXG8CMGIcsOsqDw/GcoPcosToE59Rm9e4aXaMhEQf2kPBsBRrKem1bbOAv5gOKnkliMFQ==" + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-text-encoding": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", + "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==" + }, + "node_modules/file-type": { + "version": "18.4.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.4.0.tgz", + "integrity": "sha512-o6MQrZKTAK6WpvmQk3jqTVUmqxYBxW5bloUfrdH1ZnRFDvvAPNr+l+rgOxM3nkqWT+3khaj3FRMDydWe0xhu+w==", + "dependencies": { + "readable-web-to-node-stream": "^3.0.2", + "strtok3": "^7.0.0", + "token-types": "^5.0.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==" + }, + "node_modules/jose": { + "version": "4.15.7", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.7.tgz", + "integrity": "sha512-L7ioP+JAuZe8v+T5+zVI9Tx8LtU8BL7NxkyDFVMv+Qr3JW0jSoYDedLtodaXwfqMpeCyx4WXFNyu9tJt4WvC1A==", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-parse-helpfulerror": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", + "integrity": "sha512-XgP0FGR77+QhUxjXkwOMkC94k3WtqEBfcnjWqhRd82qTat4SWKRE+9kUnynz/shm3I4ea2+qISvTIeGTNU7kJg==", + "dependencies": { + "jju": "^1.1.0" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jvm": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/jvm/-/jvm-0.5.3.tgz", + "integrity": "sha512-Sz6UChiOHgQgr4/wGA6w+sbKaxALv3EiAaZPLGWV5kYju+DuYXSLHyKkLTmYAOlUhSNedEU3In1TUXapAJV0cA==", + "dependencies": { + "adm-zip": "^0.4.9", + "binary-parser": "^1.1.5", + "cjson": "^0.5.0", + "lodash": "^4.17.5" + }, + "engines": { + "node": ">=6.3" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "node_modules/lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", + "integrity": "sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw==" + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" + }, + "node_modules/macaddress": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.5.3.tgz", + "integrity": "sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg==" + }, + "node_modules/man-db": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/man-db/-/man-db-1.0.3.tgz", + "integrity": "sha512-ZJ83PlqpgeaZSHCWgAwq7oCzrlUKa7BgiJjJLWOPblU4G2y5t7mz9GdIeVpZPax8cFx4cA6yYDcE1TWwmW+eCw==" + }, + "node_modules/minecraft-data": { + "version": "3.66.0", + "resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.66.0.tgz", + "integrity": "sha512-EevNbhPVGVeQ2OAnZ9uFVkA/MnI8Z3Zvx/Brtc6UyoQ29B8D14qfedTWbtUQLMzSOYRW79pBlSqzHCijd7iBsA==" + }, + "node_modules/minecraft-folder-path": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minecraft-folder-path/-/minecraft-folder-path-1.2.0.tgz", + "integrity": "sha512-qaUSbKWoOsH9brn0JQuBhxNAzTDMwrOXorwuRxdJKKKDYvZhtml+6GVCUrY5HRiEsieBEjCUnhVpDuQiKsiFaw==" + }, + "node_modules/minecraft-protocol": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.47.0.tgz", + "integrity": "sha512-IHL8faXLLIWv1O+2v2NgyKlooilu/OiSL9orI8Kqed/rZvVOrFPzs2PwMAYjpQX9gxLPhiSU19KqZ8CjfNuqhg==", + "dependencies": { + "@types/readable-stream": "^4.0.0", + "aes-js": "^3.1.2", + "buffer-equal": "^1.0.0", + "debug": "^4.3.2", + "endian-toggle": "^0.0.0", + "lodash.get": "^4.1.2", + "lodash.merge": "^4.3.0", + "minecraft-data": "^3.55.0", + "minecraft-folder-path": "^1.2.0", + "node-fetch": "^2.6.1", + "node-rsa": "^0.4.2", + "prismarine-auth": "^2.2.0", + "prismarine-chat": "^1.10.0", + "prismarine-nbt": "^2.5.0", + "prismarine-realms": "^1.2.0", + "protodef": "^1.8.0", + "readable-stream": "^4.1.0", + "uuid-1345": "^1.0.1", + "yggdrasil": "^1.4.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/minecraft-protocol/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/mojangson": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mojangson/-/mojangson-2.0.2.tgz", + "integrity": "sha512-iGPRE1Ez+W+42Dt4Ao91c9VVs+FmuRUlAFDef76xRX3mbZrTNuezDtFI0PbfYqheg/B0fSiq0Q0V1emZNt37cw==", + "dependencies": { + "nearley": "^2.19.5" + } + }, + "node_modules/moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nearley": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", + "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", + "dependencies": { + "commander": "^2.19.0", + "moo": "^0.5.0", + "railroad-diagrams": "^1.0.0", + "randexp": "0.4.6" + }, + "bin": { + "nearley-railroad": "bin/nearley-railroad.js", + "nearley-test": "bin/nearley-test.js", + "nearley-unparse": "bin/nearley-unparse.js", + "nearleyc": "bin/nearleyc.js" + }, + "funding": { + "type": "individual", + "url": "https://nearley.js.org/#give-to-nearley" + } + }, + "node_modules/node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-rsa": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/node-rsa/-/node-rsa-0.4.2.tgz", + "integrity": "sha512-Bvso6Zi9LY4otIZefYrscsUpo2mUpiAVIEmSZV2q41sP8tHZoert3Yu6zv4f/RXJqMNZQKCtnhDugIuCma23YA==", + "dependencies": { + "asn1": "0.2.3" + } + }, + "node_modules/peek-readable": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", + "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/prismarine-auth": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.5.0.tgz", + "integrity": "sha512-CRv/pL6d/T+4cdjWS223PXG+ygHbz40Kef04L59SLMT+axNdAQro23eZZhgiIIu6u7rlvJcZYlIY93gFNtKxXA==", + "dependencies": { + "@azure/msal-node": "^2.0.2", + "@xboxreplay/xboxlive-auth": "^3.3.3", + "debug": "^4.3.3", + "jose": "^4.1.4", + "node-fetch": "^2.6.1", + "smart-buffer": "^4.1.0", + "uuid-1345": "^1.0.2" + } + }, + "node_modules/prismarine-chat": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/prismarine-chat/-/prismarine-chat-1.10.1.tgz", + "integrity": "sha512-XukYcuueuhDxzEXG7r8BZyt6jOObrPPB4JESCgb+/XenB9nExoSHF8eTQWWj8faKPLqm1dRQaYwFJlNBlJZJUw==", + "dependencies": { + "mojangson": "^2.0.1", + "prismarine-nbt": "^2.0.0", + "prismarine-registry": "^1.4.0" + } + }, + "node_modules/prismarine-nbt": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/prismarine-nbt/-/prismarine-nbt-2.5.0.tgz", + "integrity": "sha512-F0/8UAa9SDDnAGrBYqZc4nG8h2zj5cE2eAJU5xlDR/IsQQ3moVxkOjE3h3nMv6SbvZrvAcgX7waA/nd9LLHYdA==", + "dependencies": { + "protodef": "^1.9.0" + } + }, + "node_modules/prismarine-realms": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/prismarine-realms/-/prismarine-realms-1.3.2.tgz", + "integrity": "sha512-5apl9Ru8veTj5q2OozRc4GZOuSIcs3yY4UEtALiLKHstBe8bRw8vNlaz4Zla3jsQ8yP/ul1b1IJINTRbocuA6g==", + "dependencies": { + "debug": "^4.3.3", + "node-fetch": "^2.6.1" + } + }, + "node_modules/prismarine-registry": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/prismarine-registry/-/prismarine-registry-1.7.0.tgz", + "integrity": "sha512-yyva0FpWI078nNeMhx8ekVza5uUTYhEv+C+ADu3wUQXiG8qhXkvrf0uzsnhTgZL8BLdsi2axgCEiKw9qSKIuxQ==", + "dependencies": { + "minecraft-data": "^3.0.0", + "prismarine-nbt": "^2.0.0" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/protodef": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/protodef/-/protodef-1.15.0.tgz", + "integrity": "sha512-bZ2Omw8dT+DACjJHLrBWZlqN4MlT9g9oSpJDdkUAJOStUzgJp+Zn42FJfPUdwutUxjaxA0PftN0PDlNa2XbneA==", + "dependencies": { + "lodash.get": "^4.4.2", + "lodash.reduce": "^4.6.0", + "protodef-validator": "^1.3.0", + "readable-stream": "^3.0.3" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/protodef-validator": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/protodef-validator/-/protodef-validator-1.3.1.tgz", + "integrity": "sha512-lZ5FWKZYR9xOjpMw1+EfZRfCjzNRQWPq+Dk+jki47Sikl2EeWEPnTfnJERwnU/EwFq6us+0zqHHzSsmLeYX+Lg==", + "dependencies": { + "ajv": "^6.5.4" + }, + "bin": { + "protodef-validator": "cli.js" + } + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/railroad-diagrams": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", + "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==" + }, + "node_modules/randexp": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", + "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "dependencies": { + "discontinuous-range": "1.0.0", + "ret": "~0.1.10" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readable-web-to-node-stream": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", + "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", + "dependencies": { + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/strtok3": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", + "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", + "dependencies": { + "@tokenizer/token": "^0.3.0", + "peek-readable": "^5.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/token-types": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", + "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", + "dependencies": { + "@tokenizer/token": "^0.3.0", + "ieee754": "^1.2.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-mixer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz", + "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==" + }, + "node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, + "node_modules/undici": { + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/uuid-1345": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uuid-1345/-/uuid-1345-1.0.2.tgz", + "integrity": "sha512-bA5zYZui+3nwAc0s3VdGQGBfbVsJLVX7Np7ch2aqcEWFi5lsAEcmO3+lx3djM1npgpZI8KY2FITZ2uYTnYUYyw==", + "dependencies": { + "macaddress": "^0.5.1" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yggdrasil": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/yggdrasil/-/yggdrasil-1.7.0.tgz", + "integrity": "sha512-QBIo5fiNd7688G3FqXXYGr36uyrYzczlNuzpWFy2zL3+R+3KT2lF+wFxm51synfA3l3z6IBiGOc1/EVXWCYY1Q==", + "dependencies": { + "node-fetch": "^2.6.1", + "uuid": "^8.2.0" + } + } + }, + "dependencies": { + "@azure/msal-common": { + "version": "14.12.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.12.0.tgz", + "integrity": "sha512-IDDXmzfdwmDkv4SSmMEyAniJf6fDu3FJ7ncOjlxkDuT85uSnLEhZi3fGZpoR7T4XZpOMx9teM9GXBgrfJgyeBw==" + }, + "@azure/msal-node": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.9.2.tgz", + "integrity": "sha512-8tvi6Cos3m+0KmRbPjgkySXi+UQU/QiuVRFnrxIwt5xZlEEFa69O04RTaNESGgImyBBlYbo2mfE8/U8Bbdk1WQ==", + "requires": { + "@azure/msal-common": "14.12.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + } + }, + "@discordjs/builders": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.3.tgz", + "integrity": "sha512-CTCh8NqED3iecTNuiz49mwSsrc2iQb4d0MjMdmS/8pb69Y4IlzJ/DIy/p5GFlgOrFbNO2WzMHkWKQSiJ3VNXaw==", + "requires": { + "@discordjs/formatters": "^0.3.1", + "@discordjs/util": "^0.3.1", + "@sapphire/shapeshift": "^3.8.2", + "discord-api-types": "^0.37.41", + "fast-deep-equal": "^3.1.3", + "ts-mixer": "^6.0.3", + "tslib": "^2.5.0" + } + }, + "@discordjs/collection": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.1.tgz", + "integrity": "sha512-aWEc9DCf3TMDe9iaJoOnO2+JVAjeRNuRxPZQA6GVvBf+Z3gqUuWYBy2NWh4+5CLYq5uoc3MOvUQ5H5m8CJBqOA==" + }, + "@discordjs/formatters": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.1.tgz", + "integrity": "sha512-M7X4IGiSeh4znwcRGcs+49B5tBkNDn4k5bmhxJDAUhRxRHTiFAOTVUNQ6yAKySu5jZTnCbSvTYHW3w0rAzV1MA==", + "requires": { + "discord-api-types": "^0.37.41" + } + }, + "@discordjs/rest": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.7.1.tgz", + "integrity": "sha512-Ofa9UqT0U45G/eX86cURQnX7gzOJLG2oC28VhIk/G6IliYgQF7jFByBJEykPSHE4MxPhqCleYvmsrtfKh1nYmQ==", + "requires": { + "@discordjs/collection": "^1.5.1", + "@discordjs/util": "^0.3.0", + "@sapphire/async-queue": "^1.5.0", + "@sapphire/snowflake": "^3.4.2", + "discord-api-types": "^0.37.41", + "file-type": "^18.3.0", + "tslib": "^2.5.0", + "undici": "^5.22.0" + } + }, + "@discordjs/util": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.3.1.tgz", + "integrity": "sha512-HxXKYKg7vohx2/OupUN/4Sd02Ev3PBJ5q0gtjdcvXb0ErCva8jNHWfe/v5sU3UKjIB/uxOhc+TDOnhqffj9pRA==" + }, + "@discordjs/ws": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-0.8.3.tgz", + "integrity": "sha512-hcYtppanjHecbdNyCKQNH2I4RP9UrphDgmRgLYrATEQF1oo4sYSve7ZmGsBEXSzH72MO2tBPdWSThunbxUVk0g==", + "requires": { + "@discordjs/collection": "^1.5.1", + "@discordjs/rest": "^1.7.1", + "@discordjs/util": "^0.3.1", + "@sapphire/async-queue": "^1.5.0", + "@types/ws": "^8.5.4", + "@vladfrangu/async_event_emitter": "^2.2.1", + "discord-api-types": "^0.37.41", + "tslib": "^2.5.0", + "ws": "^8.13.0" + } + }, + "@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==" + }, + "@sapphire/async-queue": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", + "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==" + }, + "@sapphire/shapeshift": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.0.tgz", + "integrity": "sha512-iJpHmjAdwX9aSL6MvFpVyo+tkokDtInmSjoJHbz/k4VJfnim3DjvG0hgGEKWtWZgCu45RaLgcoNgR1fCPdIz3w==", + "requires": { + "fast-deep-equal": "^3.1.3", + "lodash": "^4.17.21" + } + }, + "@sapphire/snowflake": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz", + "integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==" + }, + "@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" + }, + "@types/node": { + "version": "20.1.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.3.tgz", + "integrity": "sha512-NP2yfZpgmf2eDRPmgGq+fjGjSwFgYbihA8/gK+ey23qT9RkxsgNTZvGOEpXgzIGqesTYkElELLgtKoMQTys5vA==" + }, + "@types/readable-stream": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.14.tgz", + "integrity": "sha512-xZn/AuUbCMShGsqH/ehZtGDwQtbx00M9rZ2ENLe4tOjFZ/JFeWMhEZkk2fEe1jAUqqEAURIkFJ7Az/go8mM1/w==", + "requires": { + "@types/node": "*", + "safe-buffer": "~5.1.1" + } + }, + "@types/ws": { + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", + "requires": { + "@types/node": "*" + } + }, + "@vladfrangu/async_event_emitter": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz", + "integrity": "sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==" + }, + "@xboxreplay/errors": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@xboxreplay/errors/-/errors-0.1.0.tgz", + "integrity": "sha512-Tgz1d/OIPDWPeyOvuL5+aai5VCcqObhPnlI3skQuf80GVF3k1I0lPCnGC+8Cm5PV9aLBT5m8qPcJoIUQ2U4y9g==" + }, + "@xboxreplay/xboxlive-auth": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@xboxreplay/xboxlive-auth/-/xboxlive-auth-3.3.3.tgz", + "integrity": "sha512-j0AU8pW10LM8O68CTZ5QHnvOjSsnPICy0oQcP7zyM7eWkDQ/InkiQiirQKsPn1XRYDl4ccNu0WM582s3UKwcBg==", + "requires": { + "@xboxreplay/errors": "^0.1.0", + "axios": "^0.21.1" + } + }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "requires": { + "event-target-shim": "^5.0.0" + } + }, + "adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==" + }, + "aes-js": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha512-6i37w/+EhlWlGUJff3T/Q8u1RGmP5wgbiwYnOnbOqvtrPxT63/sYFyP9RcpxtxGymtfA075IvmOnL7ycNOWl3w==" + }, + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "requires": { + "follow-redirects": "^1.14.0" + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "binary-parser": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/binary-parser/-/binary-parser-1.9.2.tgz", + "integrity": "sha512-aQvTapiRIV/x7bAaR2KT3Ptyjff4R8i1zxljgw/Je2kUt0babNPUdtuo7AKN4CWklyzPK4u5e99Z9/3Ib03u9w==", + "requires": { + "fast-text-encoding": "^1.0.3" + } + }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "buffer-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", + "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==" + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "cjson": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cjson/-/cjson-0.5.0.tgz", + "integrity": "sha512-D3CKJU9YnZNyerUQ1IzNUvMnToP3MGC2XbIAPi/7yqunJJW3rBwCVapousoFtaR9IbejeEM0KIshxC1n4HQcXw==", + "requires": { + "json-parse-helpfulerror": "^1.0.3" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "discontinuous-range": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", + "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==" + }, + "discord-api-types": { + "version": "0.37.42", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.42.tgz", + "integrity": "sha512-1Huaj9cQ1W7/uryS8MZs/tZemnoKB94thM1cE40lep3rpU3q7WHqkdjN/veX0prTkYlPhcyLd/DeF/pBO8X8oQ==" + }, + "discord.js": { + "version": "14.11.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.11.0.tgz", + "integrity": "sha512-CkueWYFQ28U38YPR8HgsBR/QT35oPpMbEsTNM30Fs8loBIhnA4s70AwQEoy6JvLcpWWJO7GY0y2BUzZmuBMepQ==", + "requires": { + "@discordjs/builders": "^1.6.3", + "@discordjs/collection": "^1.5.1", + "@discordjs/formatters": "^0.3.1", + "@discordjs/rest": "^1.7.1", + "@discordjs/util": "^0.3.1", + "@discordjs/ws": "^0.8.3", + "@sapphire/snowflake": "^3.4.2", + "@types/ws": "^8.5.4", + "discord-api-types": "^0.37.41", + "fast-deep-equal": "^3.1.3", + "lodash.snakecase": "^4.1.1", + "tslib": "^2.5.0", + "undici": "^5.22.0", + "ws": "^8.13.0" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "endian-toggle": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/endian-toggle/-/endian-toggle-0.0.0.tgz", + "integrity": "sha512-ShfqhXeHRE4TmggSlHXG8CMGIcsOsqDw/GcoPcosToE59Rm9e4aXaMhEQf2kPBsBRrKem1bbOAv5gOKnkliMFQ==" + }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-text-encoding": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", + "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==" + }, + "file-type": { + "version": "18.4.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.4.0.tgz", + "integrity": "sha512-o6MQrZKTAK6WpvmQk3jqTVUmqxYBxW5bloUfrdH1ZnRFDvvAPNr+l+rgOxM3nkqWT+3khaj3FRMDydWe0xhu+w==", + "requires": { + "readable-web-to-node-stream": "^3.0.2", + "strtok3": "^7.0.0", + "token-types": "^5.0.1" + } + }, + "follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==" + }, + "jose": { + "version": "4.15.7", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.7.tgz", + "integrity": "sha512-L7ioP+JAuZe8v+T5+zVI9Tx8LtU8BL7NxkyDFVMv+Qr3JW0jSoYDedLtodaXwfqMpeCyx4WXFNyu9tJt4WvC1A==" + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "json-parse-helpfulerror": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", + "integrity": "sha512-XgP0FGR77+QhUxjXkwOMkC94k3WtqEBfcnjWqhRd82qTat4SWKRE+9kUnynz/shm3I4ea2+qISvTIeGTNU7kJg==", + "requires": { + "jju": "^1.1.0" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + } + }, + "jvm": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/jvm/-/jvm-0.5.3.tgz", + "integrity": "sha512-Sz6UChiOHgQgr4/wGA6w+sbKaxALv3EiAaZPLGWV5kYju+DuYXSLHyKkLTmYAOlUhSNedEU3In1TUXapAJV0cA==", + "requires": { + "adm-zip": "^0.4.9", + "binary-parser": "^1.1.5", + "cjson": "^0.5.0", + "lodash": "^4.17.5" + } + }, + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", + "integrity": "sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw==" + }, + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" + }, + "macaddress": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.5.3.tgz", + "integrity": "sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg==" + }, + "man-db": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/man-db/-/man-db-1.0.3.tgz", + "integrity": "sha512-ZJ83PlqpgeaZSHCWgAwq7oCzrlUKa7BgiJjJLWOPblU4G2y5t7mz9GdIeVpZPax8cFx4cA6yYDcE1TWwmW+eCw==" + }, + "minecraft-data": { + "version": "3.66.0", + "resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.66.0.tgz", + "integrity": "sha512-EevNbhPVGVeQ2OAnZ9uFVkA/MnI8Z3Zvx/Brtc6UyoQ29B8D14qfedTWbtUQLMzSOYRW79pBlSqzHCijd7iBsA==" + }, + "minecraft-folder-path": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minecraft-folder-path/-/minecraft-folder-path-1.2.0.tgz", + "integrity": "sha512-qaUSbKWoOsH9brn0JQuBhxNAzTDMwrOXorwuRxdJKKKDYvZhtml+6GVCUrY5HRiEsieBEjCUnhVpDuQiKsiFaw==" + }, + "minecraft-protocol": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.47.0.tgz", + "integrity": "sha512-IHL8faXLLIWv1O+2v2NgyKlooilu/OiSL9orI8Kqed/rZvVOrFPzs2PwMAYjpQX9gxLPhiSU19KqZ8CjfNuqhg==", + "requires": { + "@types/readable-stream": "^4.0.0", + "aes-js": "^3.1.2", + "buffer-equal": "^1.0.0", + "debug": "^4.3.2", + "endian-toggle": "^0.0.0", + "lodash.get": "^4.1.2", + "lodash.merge": "^4.3.0", + "minecraft-data": "^3.55.0", + "minecraft-folder-path": "^1.2.0", + "node-fetch": "^2.6.1", + "node-rsa": "^0.4.2", + "prismarine-auth": "^2.2.0", + "prismarine-chat": "^1.10.0", + "prismarine-nbt": "^2.5.0", + "prismarine-realms": "^1.2.0", + "protodef": "^1.8.0", + "readable-stream": "^4.1.0", + "uuid-1345": "^1.0.1", + "yggdrasil": "^1.4.0" + }, + "dependencies": { + "readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "requires": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + } + } + } + }, + "mojangson": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mojangson/-/mojangson-2.0.2.tgz", + "integrity": "sha512-iGPRE1Ez+W+42Dt4Ao91c9VVs+FmuRUlAFDef76xRX3mbZrTNuezDtFI0PbfYqheg/B0fSiq0Q0V1emZNt37cw==", + "requires": { + "nearley": "^2.19.5" + } + }, + "moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nearley": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", + "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", + "requires": { + "commander": "^2.19.0", + "moo": "^0.5.0", + "railroad-diagrams": "^1.0.0", + "randexp": "0.4.6" + } + }, + "node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "node-rsa": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/node-rsa/-/node-rsa-0.4.2.tgz", + "integrity": "sha512-Bvso6Zi9LY4otIZefYrscsUpo2mUpiAVIEmSZV2q41sP8tHZoert3Yu6zv4f/RXJqMNZQKCtnhDugIuCma23YA==", + "requires": { + "asn1": "0.2.3" + } + }, + "peek-readable": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", + "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==" + }, + "prismarine-auth": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.5.0.tgz", + "integrity": "sha512-CRv/pL6d/T+4cdjWS223PXG+ygHbz40Kef04L59SLMT+axNdAQro23eZZhgiIIu6u7rlvJcZYlIY93gFNtKxXA==", + "requires": { + "@azure/msal-node": "^2.0.2", + "@xboxreplay/xboxlive-auth": "^3.3.3", + "debug": "^4.3.3", + "jose": "^4.1.4", + "node-fetch": "^2.6.1", + "smart-buffer": "^4.1.0", + "uuid-1345": "^1.0.2" + } + }, + "prismarine-chat": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/prismarine-chat/-/prismarine-chat-1.10.1.tgz", + "integrity": "sha512-XukYcuueuhDxzEXG7r8BZyt6jOObrPPB4JESCgb+/XenB9nExoSHF8eTQWWj8faKPLqm1dRQaYwFJlNBlJZJUw==", + "requires": { + "mojangson": "^2.0.1", + "prismarine-nbt": "^2.0.0", + "prismarine-registry": "^1.4.0" + } + }, + "prismarine-nbt": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/prismarine-nbt/-/prismarine-nbt-2.5.0.tgz", + "integrity": "sha512-F0/8UAa9SDDnAGrBYqZc4nG8h2zj5cE2eAJU5xlDR/IsQQ3moVxkOjE3h3nMv6SbvZrvAcgX7waA/nd9LLHYdA==", + "requires": { + "protodef": "^1.9.0" + } + }, + "prismarine-realms": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/prismarine-realms/-/prismarine-realms-1.3.2.tgz", + "integrity": "sha512-5apl9Ru8veTj5q2OozRc4GZOuSIcs3yY4UEtALiLKHstBe8bRw8vNlaz4Zla3jsQ8yP/ul1b1IJINTRbocuA6g==", + "requires": { + "debug": "^4.3.3", + "node-fetch": "^2.6.1" + } + }, + "prismarine-registry": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/prismarine-registry/-/prismarine-registry-1.7.0.tgz", + "integrity": "sha512-yyva0FpWI078nNeMhx8ekVza5uUTYhEv+C+ADu3wUQXiG8qhXkvrf0uzsnhTgZL8BLdsi2axgCEiKw9qSKIuxQ==", + "requires": { + "minecraft-data": "^3.0.0", + "prismarine-nbt": "^2.0.0" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" + }, + "protodef": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/protodef/-/protodef-1.15.0.tgz", + "integrity": "sha512-bZ2Omw8dT+DACjJHLrBWZlqN4MlT9g9oSpJDdkUAJOStUzgJp+Zn42FJfPUdwutUxjaxA0PftN0PDlNa2XbneA==", + "requires": { + "lodash.get": "^4.4.2", + "lodash.reduce": "^4.6.0", + "protodef-validator": "^1.3.0", + "readable-stream": "^3.0.3" + } + }, + "protodef-validator": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/protodef-validator/-/protodef-validator-1.3.1.tgz", + "integrity": "sha512-lZ5FWKZYR9xOjpMw1+EfZRfCjzNRQWPq+Dk+jki47Sikl2EeWEPnTfnJERwnU/EwFq6us+0zqHHzSsmLeYX+Lg==", + "requires": { + "ajv": "^6.5.4" + } + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" + }, + "railroad-diagrams": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", + "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==" + }, + "randexp": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", + "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "requires": { + "discontinuous-range": "1.0.0", + "ret": "~0.1.10" + } + }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readable-web-to-node-stream": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", + "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", + "requires": { + "readable-stream": "^3.6.0" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==" + }, + "smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "strtok3": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", + "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", + "requires": { + "@tokenizer/token": "^0.3.0", + "peek-readable": "^5.0.0" + } + }, + "token-types": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", + "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", + "requires": { + "@tokenizer/token": "^0.3.0", + "ieee754": "^1.2.1" + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "ts-mixer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz", + "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==" + }, + "tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, + "undici": { + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "requires": { + "@fastify/busboy": "^2.0.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, + "uuid-1345": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uuid-1345/-/uuid-1345-1.0.2.tgz", + "integrity": "sha512-bA5zYZui+3nwAc0s3VdGQGBfbVsJLVX7Np7ch2aqcEWFi5lsAEcmO3+lx3djM1npgpZI8KY2FITZ2uYTnYUYyw==", + "requires": { + "macaddress": "^0.5.1" + } + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "requires": {} + }, + "yggdrasil": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/yggdrasil/-/yggdrasil-1.7.0.tgz", + "integrity": "sha512-QBIo5fiNd7688G3FqXXYGr36uyrYzczlNuzpWFy2zL3+R+3KT2lF+wFxm51synfA3l3z6IBiGOc1/EVXWCYY1Q==", + "requires": { + "node-fetch": "^2.6.1", + "uuid": "^8.2.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..b6dd7a9 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "dependencies": { + "discord.js": "^14.11.0", + "js-yaml": "^4.1.0", + "jvm": "^0.5.3", + "man-db": "^1.0.3", + "minecraft-data": "^3.36.1", + "minecraft-protocol": "^1.47.0", + "prismarine-auth": "^2.2.0", + "prismarine-chat": "^1.10.1", + "prismarine-registry": "^1.7.0" + } +} diff --git a/src/bot.js b/src/bot.js new file mode 100644 index 0000000..2395341 --- /dev/null +++ b/src/bot.js @@ -0,0 +1,74 @@ +const mc = require('minecraft-protocol') +const { EventEmitter } = require('events') +const fs = require('fs') +const path = require('path') +require("events").EventEmitter.defaultMaxListeners = Infinity; +function createBot(options = {}) { + const bot = new EventEmitter() + bot.options = { + // Set some default values in options + host: options.host ??= 'localhost', + username: options.username ??= 'Player', + hideErrors: options.hideErrors ??= true, // HACK: Hide errors by default as a lazy fix to console being spammed with them + }; + bot.options = options + + // Create our client object, put it on the bot, and register some events + bot.on('init_client', client => { + client.on('packet', (data, meta) => { + bot.emit('packet', data, meta) + bot.emit('packet.' + meta.name, data) + }) + + client.on('login', () => { + bot.uuid = client.uuid + bot.username = client.username + }) + client.on('disconnect', (data) => { + bot.emit("disconnect", data.reason) + }) + client.on('end', reason => { + bot.emit('end', reason); + }) + + client.on('error', error => { +// bot.emit('error', error) + console.log(error.toString()) + }) + + client.on("keep_alive", ({ keepAliveId }) => { + bot.emit("keep_alive", { keepAliveId }) + }) + + client.on('kick_disconnect', (data) => { + bot.emit("kick_disconnect", data.reason) + }) + + process.on("uncaughtException", (e) => { + console?.warn(e.stack) + }); + }) + + const client = options.client ?? mc.createClient(options) + bot._client = client + bot.emit('init_client', client) + + bot.bots = options.bots ?? [bot] + + // Modules +/* + bot.loadModule = module => module(bot, options) + + for (const filename of fs.readdirSync(path.join(__dirname, 'modules'))) { + try { + const module = require(path.join(__dirname, 'modules', filename)) + bot.loadModule(module) + } catch (error) { + console.error('Failed to load module', filename, ':', error) + } + } +*/ + return bot +} + +module.exports = createBot diff --git a/src/commands/bots.js b/src/commands/bots.js new file mode 100644 index 0000000..5950b5a --- /dev/null +++ b/src/commands/bots.js @@ -0,0 +1,199 @@ +// TODO: Maybe add more authors +const bots = [ + { + name: { text: 'HBot', color: 'aqua', bold:true }, + authors: ['hhhzzzsss'], + exclaimer:'HBOT HARRYBUTT LMAOOOOOOOOOOOOOOOOO', + foundation: 'java/mcprotocollib', + prefixes: ['#'] + }, + { + name: [{ text: 'Evil', color: 'dark_red' }, {text:'Bot', color:'dark_purple'}], + authors: ['FusseligerDev'], + exclaimer:'', + foundation: 'Java/Custom', + prefixes: ['!'] + }, + { + name: { text: 'SBot Java', color: 'white', bold:true }, // TODO: Gradient + authors: ['evkc'], + foundation: 'Java/MCProtocolLib', + prefixes: [':'] + }, + { + name: { text: 'SBot Rust', color: 'white', bold:true }, // TODO: Gradient + authors: ['evkc'], + foundation: 'Rust', + prefixes: ['re:'] + }, + { + name: { text: 'Z-Boy-Bot', color: 'dark_purple' }, // 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: '', + authors: ['yfd'], + foundation: 'NodeJS/Node-Minecraft-Protocol', + prefixes: ['<'] + }, + { + name: { text: 'FardBot', color: 'dark_purple' }, + authors: ['_yfd'], + exclaimer: 'bot is dead lol', + foundation: 'NodeJS/Mineflayer', + prefixes: ['<'] + }, + + { + name: { text: 'ChipmunkBot', color: 'green' }, + authors: ['_ChipMC_'], + exclaimer: 'chips? also shoutout to chip and chayapak for helping in the rewrite', + + foundation: 'Java/MCProtocolLib', + prefixes: ["'", "/'"] + }, + { + name: { text: 'ChipmunkBot Old', color: 'green' }, + authors: ['_ChipMC_'], + foundation: 'NodeJS/Node-Minecraft-Protocol', + + }, + { + name: { text: 'TestBot', color: 'aqua' }, + authors: ['Blackilykat'], + foundation: 'Java/MCProtocolLib', + prefixes: ["-"] + }, + { + name: { text: 'UBot', color: 'grey' }, + authors: ['HexWoman'], + exclaimer: 'UwU OwO', + + foundation: 'NodeJS/node-minecraft-protocol', + prefixes: ['"'] + }, + { + name: { text: 'ChomeNS Bot Java', color: 'yellow'}, + authors: ['chayapak'], + exclaimer: 'wow its my bot !! ! 4374621q43567%^&#%67868-- chayapak', + foundation: 'Java/MCProtocolLib', + prefixes: ['*', 'cbot ', '/cbot '] + }, + { + name: { text: 'ChomeNS Bot NodeJS', color: 'yellow'}, + authors: ['chayapak'], + + foundation: 'NodeJS/Node-Minecraft-Protocol', + prefixes: ['*', 'cbot', '/cbot'] + }, + { + name: { text: 'RecycleBot', color: 'dark_green'}, + foundation: ['MorganAnkan'], + exclaimer: 'nice bot', + language: 'NodeJS/node-minecraft-protocol', + prefixes: ['='] + }, + { + name: { text: 'ManBot', color: 'dark_green' , }, + 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'}, { text: 'Bot', color: 'red' }], + exclaimer: '', + authors: ['SirLennox'], + foundation: 'Java/custom', + prefixes: [','] + }, + { + name: [{ text: 'KittyCorp', color: 'yellow' }, { text: 'Bot', color: 'yellow' }], + 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: true}, {text:'Boyfriend', color: 'aqua', bold:true}, {text:'Bot', color:'dark_red', bold:true}, {text:'X', color:'black', bold:true}], + authors: [{ text:'Parker2991', color: 'dark_red'}, {text:' _ChipMC_', color: 'dark_green', bold:true}, {text:' chayapak', color:'yellow', bold:true}], + exclaimer: '4.0 (this Bot) also the Ultimate version of the FNFBoyfriendBot Builds', + foundation: 'NodeJS/node-minecraft-protocol', + prefixes: ['~'] + }, + { + name: [{ text:'FNF', color: 'dark_purple', bold: true}, {text:'Boyfriend', color: 'aqua', bold:true}, {text:'Bot', color:'dark_red', bold:true}, {text:' Legacy', color:'green', bold:true}], + authors: [{text:'Parker2991', color:'dark_red' }, {text:' _ChipMC_', color:'dark_green', bold:true }], + exclaimer:'1037 LINES OF CODE WTFARD!??! also this version is in console commands only' , + foundation: 'NodeJS/mineflayer', + prefixes: [] + } +] + +module.exports = { + name: 'bots', + trustLevel: 0, + aliases: [ + "knownbots" + ], + description: 'A list of known bots', + usages: [ + '', + ], + execute (context) { + const query = context.arguments.join(' ').toLowerCase() + const source = context.source; + const bot = context.bot; + if (query.length === 0) { + const list = [] + + for (const info of bots) { + if (list.length !== 0) list.push({ text: ', ', color: 'gray' }) + list.push(info.name) + } + + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, ['Known bots (', bots.length, ') - ', ...list], false) + return + } + + for (const info of bots) { + const plainName = String(context.bot.getMessageAsPrismarine(info.name)).toLowerCase() + if (plainName.includes(query)) this.sendBotInfo(info, context.bot) + } + }, + + sendBotInfo (info, bot) { + const component = [''] + component.push('Name: ', info.name) + if (info.exclaimer) component.push('\n', 'Exclaimer: ', info.exclaimer) + if (info.authors && info.authors.length !== 0) { + component.push('\n', 'Authors: ') + for (const author of info.authors) { + component.push(author, { text: ', ', color: 'gray' }) + } + component.pop() + } + if (info.foundation) component.push('\n', 'Foundation: ', info.foundation) + if (info.prefixes && info.prefixes.length !== 0) { + component.push('\n', 'Prefixes: ') + for (const prefix of info.prefixes) { + component.push(prefix, { text: ', ', color: 'gray' }) + } + component.pop() + } + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [component]) + } +}//it doing it just for the ones i added lol +// prob a replit moment, it probably thinks there are regexes in the strings diff --git a/src/commands/cloop.js b/src/commands/cloop.js new file mode 100644 index 0000000..28fdc60 --- /dev/null +++ b/src/commands/cloop.js @@ -0,0 +1,77 @@ +module.exports = { + name: 'cloop', + trustLevel: 1, + aliases: [ + "commandloop" + ], + description: 'run cloops', + execute (context) { + const args = context.arguments + const bot = context.bot + const source = context.source + if (!args && !args[0] && !args[1] && !args[2] && !args[3]) return + switch (args[1]) { + case 'add': + if (parseInt(args[2]) === NaN) bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: 'Invalid interval', color: 'red' }) + const interval = parseInt(args[2]) + const command = args.slice(3).join(' '); + bot.cloop.add(command, interval) + + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { + translate: 'Added \'%s\' with interval %s to the cloops', + with: [ command, interval ] + }) + break + case 'remove': + if (parseInt(args[2]) === NaN) bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: 'Invalid index', color: 'red' }) + + const index = parseInt(args[2]) + + bot.cloop.remove(index) + + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { + translate: 'Removed cloop %s', + with: [ index ] + }) + break + case 'clear': + bot.cloop.clear() + + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: 'Cleared all cloops' }) + break + case 'list': + const component = [] + + const listComponent = [] + let i = 0 + for (const cloop of bot.cloop.list) { + listComponent.push({ + translate: '%s \u203a %s (%s)', + with: [ + i, + cloop.command, + cloop.interval + ] + }) + listComponent.push('\n') + + i++ + } + + listComponent.pop() + + component.push({ + translate: 'Cloops (%s):', + with: [ bot.cloop.list.length ] + }) + component.push('\n') + component.push(listComponent) + + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, component) + break + default: + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: 'Invalid action', color: 'red' }) + break + } + } +} diff --git a/src/commands/console.js b/src/commands/console.js new file mode 100644 index 0000000..80c2df7 --- /dev/null +++ b/src/commands/console.js @@ -0,0 +1,33 @@ +module.exports = { + name: 'console', + trustLevel: 3, + aliases: [ + + ], + execute (context) { + const bot = context.bot + const args = context.arguments; + const source = context.source; + if (!args && !args[0] && !args[1] && !args[2] && !args[3]) return; + switch (args[0]) { + case "consoleserver": + case "csvr": + const servers = bot.bots.map(eachBot => eachBot.options.host); + for (const eachBot of bot.bots) { + if (args.slice(1).join(' ').toLowerCase() === 'all') { + eachBot.console.consoleServer = 'all' + bot.console.log("Set the console server to all"); + continue + } + const server = servers.find(server => server.toLowerCase().includes(args[1])) + if (!server) { + bot.console.log("Invalid server"); + return + } + bot.console.log(`Set the console server to ` + server); + eachBot.console.consoleServer = server; + } + break + } + } +} diff --git a/src/commands/core.js b/src/commands/core.js new file mode 100644 index 0000000..86549a0 --- /dev/null +++ b/src/commands/core.js @@ -0,0 +1,21 @@ +const CommandError = require('../util/command_error') + +module.exports = { + name: 'core', + trustLevel: 0, + aliases: [ + "cb", + "corerun", + "commandcorerun", + ], + description: 'run commands in core!', + execute (context) { + const bot = context.bot + const message = context.arguments.join(' ') + if (message.startsWith('/')) { + bot.core.run(message.substring(1)) + return + } + bot.core.run(message) + } +} diff --git a/src/commands/discord.js b/src/commands/discord.js new file mode 100644 index 0000000..b991f79 --- /dev/null +++ b/src/commands/discord.js @@ -0,0 +1,9 @@ +const CommandError = require('../util/command_error') + +module.exports = { + name: 'discord', + trustLevel: 0, + execute (context) { + bot.tellraw(context.bot.discord.invite, false) + } +} diff --git a/src/commands/echo.js b/src/commands/echo.js new file mode 100644 index 0000000..51ff737 --- /dev/null +++ b/src/commands/echo.js @@ -0,0 +1,19 @@ +module.exports = { + name: 'echo', + trustLevel: 0, + aliases: [ + "say", + "botsay", + ], + description: 'Make me say something', + execute (context) { + const bot = context.bot + const message = context.arguments.join(' ') + + if (message.startsWith('/')) { + bot.chat.command(message.substring(1)) + return + } + bot.chat.message(message) + } +} diff --git a/src/commands/errortest.js b/src/commands/errortest.js new file mode 100644 index 0000000..239601d --- /dev/null +++ b/src/commands/errortest.js @@ -0,0 +1,10 @@ +const CommandError = require('../util/command_error') + +module.exports = { + name: 'errortest', + trustLevel: 0, + execute (context) { + const message = context.arguments.join(' ') + throw new Error(message) + } +} diff --git a/src/commands/help.js b/src/commands/help.js new file mode 100644 index 0000000..580e49d --- /dev/null +++ b/src/commands/help.js @@ -0,0 +1,93 @@ +const CommandError = require('../util/command_error') +/* +pub_lickColor: "#2b7589" + t_rustedColor: "#219696" + own_herColor: "#2081c3" +*/ +module.exports = { + name: 'help', + trustLevel: 0, + aliases: [ + "heko", + "?", + "cmds", + ], + description: 'a list of the bots commands', + execute (context) { + const commandList = []; + const bot = context.bot; + const source = context.source; + const args = context.arguments; + const selector = '@a'; + console.log(source) + const category = { + translate: '(%s%s%s%s%s) \u203a ', + bold: false, + color: 'gray', + with: [ + { color: "blue", text: 'Public'}, + { color: "gray", text: ' | '}, + { color: "dark_aqua", text: 'Trusted'}, + { color: 'gray', text: ' | '}, + { color: "dark_blue", text: 'Owner'}, + ] + } + let public = []; + let trusted = []; + let owner = []; + for (const command of bot.commandManager.commandlist) { + console.log(command.name) + if (args[0] === command.name) { + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [ + { + text: `CommandName \u203a ${command.name}\n`, + color: 'gray', + }, + { + text: `Aliases \u203a ${command.aliases}\n`, + color: 'gray', + }, + { + text: `Description \u203a ${command.description}`, + color: 'gray', + } + ]); + return + } + if (command.trustLevel === 0) { + public.push([ + { + text: command.name + ' ', + color: "blue", + } + ]) + } else if (command.trustLevel === 1) { + trusted.push([ + { + text: command.name + ' ', + color: "dark_aqua" + } + ]) + } else if (command.trustLevel === 2) { + owner.push([ + { + text: command.name + ' ', + color: "dark_blue" + } + ]) + } + } + const length = bot.commandManager.commandlist.filter(c => c.trustLevel != 3).length + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [ + { text: 'Commands (', color: 'gray' }, + { text: JSON.stringify(length), color: 'gold' }, + { text: ') ', color: 'gray' }, + category, + public, + trusted, + owner + ]) +// bot.tellraw([ public, trusted, owner ]) + } +} + diff --git a/src/commands/info.js b/src/commands/info.js new file mode 100644 index 0000000..632a2d6 --- /dev/null +++ b/src/commands/info.js @@ -0,0 +1,35 @@ +module.exports = { + name: 'info', + trustLevel: 0, + aliases: [ + "information", + ], + description: 'check the bots info', + execute (context) { + const bot = context.bot; + const args = context.arguments; + const config = context.config; + const discordClient = context.discordClient; + const source = context.source; + switch (args[0]) { + case 'version': + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, `§9Friday §9Night §9Funkin §3Boyfriend §1Bot§8§r-v6.0.0-alpha-700-§bSk§4y §bRedux\n11/22/22 - ${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO" })}`); + break // &9 &3 &1 + case 'login': + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [ + { + text: `Minecraft username \u203a ${bot.options.username}\n`, + color: 'gray', + }, + { + text: `Discord username \u203a ${discordClient.user.tag}`, + color: 'gray', + } + ]); + break; + case 'discord': + bot.tellraw('@a', config.discord.invite) + break + } + } +} diff --git a/src/commands/list.js b/src/commands/list.js new file mode 100644 index 0000000..d4193ab --- /dev/null +++ b/src/commands/list.js @@ -0,0 +1,51 @@ +const CommandError = require('../util/command_error') +const { EmbedBuilder } = require('discord.js') +const { request } = require('undici'); +module.exports = { + name: 'list', + description:['check the player list'], + trustLevel: 0, + aliases:['playerlist', 'plist', 'pl'], + usage:[""], + async execute (context) { + const bot = context.bot + const args = context.arguments + const players = bot.players + const source = context.source + const component = [] + const url = await request(`https://eu.mc-api.net/v3/server/ping/${bot.options.host}`) + const server = await url.body.json() + for (const player of players) { + component.push({ + translate: `%s \u203a %s [%s %s %s %s %s]`, + with: [ + player.displayName ?? player.profile.name, + player.uuid, + { text: `Ping:`, color: 'dark_green' }, + { text: `${player.latency}`, color: 'gold' }, + { text: '/', color: 'gray' }, + { text: `Gamemode:`, color: 'dark_purple' }, + { text: `${player.gamemode}`, color: 'gold' }, + ] + }) + component.push('\n') + } + component.pop() + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [ + { text: `Players: `, color:'gray' }, + { text: '(' , color: 'gray' }, + { text: `${JSON.stringify(bot.players.length)}`, color: 'gold' }, + { text: ` / `, color: 'gray' }, + { text: `${server.players.max}`, color: 'gold' }, + { text: ')\n', color: 'gray' }, + component + ]) + // bot.tellraw(component) + }, + discordExecute(context) { + const bot = context.bot + const players = bot.players + } +} +//what is wi +// IDK diff --git a/src/commands/mcserver.js b/src/commands/mcserver.js new file mode 100644 index 0000000..0b52ccf --- /dev/null +++ b/src/commands/mcserver.js @@ -0,0 +1,61 @@ +const { request } = require('undici'); +const CommandError = require('../util/command_error.js'); +module.exports = { + name: 'mcserver', + trustLevel: 0, + aliases: [ +// "say", +// "botsay", + ], + description: 'look up minecraft server info', + async execute (context) { + const bot = context.bot; + const discordClient = context.discordClient; + const args = context.arguments; + const source = context.source; + try { + const url = await request(`https://eu.mc-api.net/v3/server/ping/${args[0]}`) + server = await url.body.json() + console.log(server) + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, [ + { + text: `Ip \u203a ${args[0]}\n`, + color: 'gray' + }, + { + text: `Players \u203a ${server.players.online}/${server.players.max}\n`, + color: 'gray' + }, + { + text: `Version \u203a ${server.version.name}\n`, + color: 'gray', + }, + { + text: "Motd \u203a\n", + color: 'gray', + }, + server.description, + ])// error: 'Ping Failed', + } catch (error) { + if (error.toString() === "TypeError: Cannot read properties of undefined (reading 'online')") { + bot.tellraw({ text: 'unable to ping server make sure the ip is correct', color: 'dark_red' }) + } else { + bot.tellraw(error.toString()) + } + } + } +} +/* + try { + const server = await request(`https://eu.mc-api.net/v3/server/ping/${interaction.options.getString('ip')}`); + json = await server.body.json() + console.log((json)) + const Embed = new EmbedBuilder() + .setColor(`${config.colors.commands.embed}`) + .setTitle(`${this.data.name} Command`) +setDescription( +`IP \u203a ${interaction.options.getString('ip')}\nPlayer Count \u203a ${json.players.online}/${json.players.max}\nOnline \u203a ${json.online}\n +Version \u203a ${json.version.name}\nMotd \u203a ${JSON.stringify(json.description)}`) + .setThumbnail(`${json.favicon}`) + +*/ diff --git a/src/commands/netmsg.js b/src/commands/netmsg.js new file mode 100644 index 0000000..9b945e3 --- /dev/null +++ b/src/commands/netmsg.js @@ -0,0 +1,25 @@ +const CommandError = require('../util/command_error.js') +module.exports = { + name: 'netmsg', + trustLevel: 0, + aliases: [ + + ], + description: 'netmsg to other servers', + execute (context) { + const message = context.arguments.join(' ') + const bot = context.bot; + const source = context.source +//throw new CommandError('ohio') + const component = { + translate: '[%s] %s \u203a %s', + with: [ + bot.options.host + ':' + bot.options.port, + source.player.displayName ?? source.player.profile.name, + message + ] + } + + for (const eachBot of bot.bots) eachBot.tellraw("@a", component) + } +} diff --git a/src/commands/ownervalidationtest.js b/src/commands/ownervalidationtest.js new file mode 100644 index 0000000..cc994d7 --- /dev/null +++ b/src/commands/ownervalidationtest.js @@ -0,0 +1,8 @@ +module.exports = { + name: 'ovtest', + trustLevel: 2, + execute (context) { + const bot = context.bot + bot.chat.message('mrrrroww >:3') + } +} diff --git a/src/commands/ping.js b/src/commands/ping.js new file mode 100644 index 0000000..7fc7142 --- /dev/null +++ b/src/commands/ping.js @@ -0,0 +1,21 @@ +module.exports = { + name: 'ping', + trustLevel: 0, + execute (context) { + const source = context.source; + const bot = context.bots; + if (context.arguments.length !== 0) { + const argumentList = [] + + for (const argument of context.arguments) { + if (argumentList.length !== 0) argumentList.push(' ') + argumentList.push(argument) + } + + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: 'Ping Arguments: ', extra: argumentList }, false) + return + } + + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, 'Pong!', false) + } +} diff --git a/src/commands/reconnect.js b/src/commands/reconnect.js new file mode 100644 index 0000000..5063bbd --- /dev/null +++ b/src/commands/reconnect.js @@ -0,0 +1,14 @@ +module.exports = { + name: 'reconnect', + trustLevel: 1, + aliases: [ + "end", + "recon", + ], + description: 'reconnect the bot', + execute (context) { + const bot = context.bot + const message = context.arguments.join(' ') + bot._client.end() + } +} diff --git a/src/commands/test.js b/src/commands/test.js new file mode 100644 index 0000000..10e5dd2 --- /dev/null +++ b/src/commands/test.js @@ -0,0 +1,21 @@ +const CommandError = require('../util/command_error') + +module.exports = { + name: 'test', + trustLevel: 0, + execute (context) { + if (context.arguments.length !== 0) { + const argumentList = [] + + for (const argument of context.arguments) { + if (argumentList.length !== 0) argumentList.push(' ') + argumentList.push(argument) + } + + bot.tellraw({ text: 'Hello, world! Arguments: ', extra: argumentList }, false) + return + } + + bot.tellraw('Hello, world!', false) + } +} diff --git a/src/commands/urban.js b/src/commands/urban.js new file mode 100644 index 0000000..f73103b --- /dev/null +++ b/src/commands/urban.js @@ -0,0 +1,78 @@ +const CommandError = require('../util/command_error') +const { EmbedBuilder, ButtonBuilder, ButtonStyle, ActionRowBuilder, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, SlashCommandBuilder } = require('discord.js'); +const { request } = require('undici'); +module.exports = { + name: 'urban', + description:['urban dictionary'], + aliases:['urbandictionary'], + trustLevel: 0, + usage:[ + "all ", + "single ", + ], + async execute (context) { + const source = context.source + const args = context.arguments + const bot = context.bot + const prefix = [ + { text: '[', color: 'dark_gray' }, + { text: 'Urban', color: '#B72A00' }, + { text: '] ', color: 'dark_gray'} + ] + let component = []; + let term = `${args.join(' ')}` + const query = new URLSearchParams({ term }); + const dictResult = await request(`https://api.urbandictionary.com/v0/define?${query}`); + const { list } = await dictResult.body.json(); + if (!list.length) { + bot.sendError('No results found'); + } + for (const definitions of list) { + component.push(prefix, [ + { + text: `${definitions.definition.replaceAll('\r','').replaceAll('[', '\xa71\xa7n\xa7o').replaceAll(']','\xa7r\xa77')}\n`, + color: 'gray', + underlined: false, + italic: false, + translate:"", + hoverEvent: { + action:"show_text", + value: [ + { + text: `Example \u203a \n ${definitions.example.replaceAll('\r', '').replaceAll('[', '\xa71\xa7n\xa7o').replaceAll(']','\xa7r\xa77')}`, + color: 'dark_blue' + }, + { + text: `Word \u203a ${definitions.word.replaceAll('\r', '').replaceAll('[', '\xa71\xa7n\xa7o').replaceAll(']','\xa7r\xa77')}\n`, + color: 'dark_blue', + }, + { + text: `Author \u203a ${definitions.author.replaceAll('\r', '').replaceAll('[', '\xa71\xa7n\xa7o').replaceAll(']','\xa7r\xa77')}\n`, + color: 'dark_blue' + }, + { + text: `written on \u203a ${definitions.written_on.replaceAll('\r', '').replaceAll('[', '\xa71\xa7n\xa7o').replaceAll(']','\xa7r\xa77')}\n`, + color: 'dark_blue' + }, + { + text: `Rating \u203a Thumbs-Up ${definitions.thumbs_up} / Thumbs-Down ${definitions.thumbs_down}`, + color: 'gray' + } + ] + }, + clickEvent: { + action: 'open_url', + value: `${definitions.permalink}` + } + }, + ]) + } + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, component) + }, + async discordExecute (context) { + const bot = context.bot; + const args = context.arguments; + const component = []; + } +} + diff --git a/src/commands/validate.js b/src/commands/validate.js new file mode 100644 index 0000000..6425169 --- /dev/null +++ b/src/commands/validate.js @@ -0,0 +1,18 @@ +module.exports = { + name: 'validate', + trustLevel: 1, + aliases: [ + "val" + ], + description: 'validate through the bot', + execute (context) { + const bot = context.bot; + const args = context.arguments; + const source = context.source; + if (args[0] === bot.trusted) { + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: "Valid Trusted hash", color: "dark_green" }); + } if (args[0] === bot.owner) { + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: "Valid Owner hash", color: "dark_green" }); + } + } +} diff --git a/src/data/default_config.yml b/src/data/default_config.yml new file mode 100644 index 0000000..03a56c8 --- /dev/null +++ b/src/data/default_config.yml @@ -0,0 +1,18 @@ +prefixes: + - "!" + +discord: + token: "discord bot token here" + prefix: "!" + invite: "discord server invite here" + +keys: + trusted: "trusted key here" + owner: "owner key here" + +bots: + - host: "localhost" + username: "FNFBoyfriendBot" + version: "1.20.2" + reconnectDelay: 6000 + channelId: "channel id here" diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..6eca9e7 --- /dev/null +++ b/src/index.js @@ -0,0 +1,28 @@ +const createBot = require('./bot.js'); +const readline = require('readline'); +const loadModules = require('./util/loadModules'); +const js_yaml = require('js-yaml'); +const fs = require('fs'); +const path = require('path'); +const { Client, GatewayIntentBits } = require('discord.js'); +const { MessageContent, GuildMessages, Guilds } = GatewayIntentBits; +const discordClient = new Client({ intents: [Guilds, GuildMessages, MessageContent] }); +console.log('Starting FNFBoyfriendBot'); +try { + config = js_yaml.load(fs.readFileSync(path.join(__dirname, '../', 'config.yml'))) +} catch (e) { + console.log(e.stack); +} +const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, +}) +const bots = []; +for (const options of config.bots) { + const bot = createBot(options); + bots.push(bot); + bot.bots = bots; + discordClient.login(config.discord.token); + loadModules(bot, options, config, discordClient); + bot.console.useReadlineInterface(rl); +} diff --git a/src/modules/boot.js b/src/modules/boot.js new file mode 100644 index 0000000..9483709 --- /dev/null +++ b/src/modules/boot.js @@ -0,0 +1,6 @@ +function boot (bot, options, discordClient, config) { + bot.on("packet.login", (data) => { + bot.chat.message('&9FNF&3Boyfriend&1Bot &fcreated by &4Parker&02991'); + }) // &9 &3 &1 +} +module.exports = boot; diff --git a/src/modules/chat.js b/src/modules/chat.js new file mode 100644 index 0000000..dd4e6c8 --- /dev/null +++ b/src/modules/chat.js @@ -0,0 +1,144 @@ +const loadPrismarineChat = require('prismarine-chat') +const KaboomChatParser = require('../util/ChatParsers/Kaboom') +const ChipmunkModChatParser = require('../util/ChatParsers/ChipmunkMod') + +function tryParse (json) { + try { + return JSON.parse(json) + } catch (error) { + return { text: '' } + } +} +//what was changed?? +function chat (bot, options, config) { + let ChatMessage + bot.on('registry_ready', registry => { + ChatMessage = loadPrismarineChat(registry) + }) + + bot.chatParsers = [KaboomChatParser, ChipmunkModChatParser] + + bot.on('packet.profileless_chat', packet => { + const message = tryParse(packet.message) + const sender = tryParse(packet.name) + + bot.emit('profileless_chat', { + message, + type: packet.type, + sender + }) + + bot.emit('message', message) + + tryParsingMessage(message, { senderName: sender, players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine }) + }) + + bot.on('packet.player_chat', packet => { + const unsigned = tryParse(packet.unsignedChatContent) + + bot.emit('player_chat', { plain: packet.plainMessage, unsigned, senderUuid: packet.senderUuid }) + + bot.emit('message', unsigned) + + tryParsingMessage(unsigned, { senderUuid: packet.senderUuid, players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine }) + }) + + bot.on('packet.system_chat', packet => { + const message = tryParse(packet.content) + + if (message.translate === 'advMode.setCommand.success') return // Ignores command set message + + bot.emit('system_chat', { message, actionbar: packet.isActionBar }) + + if (packet.isActionBar) { + return + } + + bot.emit('message', message) + + tryParsingMessage(message, { players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine }) + }) + + function tryParsingMessage (message, data) { + let parsed + for (const parser of bot.chatParsers) { + parsed = parser(message, data) + if (parsed) break + } + + if (!parsed) return + bot.emit('parsed_message', parsed) + } + + bot.getMessageAsPrismarine = message => { + try { + if (ChatMessage !== undefined) { + return new ChatMessage(message) + } + } catch {} + + 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; + 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: message?.substring(0, 256), + timestamp: BigInt(Date.now()), + salt: 0n, + offset: 0, + acknowledged: bitset + }) + }, + command: command => { + bot._client.write('chat_command', { + command: command?.substring(0, 256), + timestamp: BigInt(Date.now()), + salt: 0n, + argumentSignatures: [], + signedPreview: false, + messageCount: 0, + acknowledged: Buffer.alloc(3), + previousMessages: [] + }) + } + } +// 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 new file mode 100644 index 0000000..6ee6cdd --- /dev/null +++ b/src/modules/command_core.js @@ -0,0 +1,74 @@ +function core (bot, options, config) { + bot.core = { + area: { + start: options.core?.area.start ?? { x: 0, y: 0, z: 0 }, + end: options.core?.area.end ?? { x: 15, y: 0, z: 15 } + }, + position: null, + currentBlockRelative: { x: 0, y: 0, z: 0 }, + + refill () { + const pos = bot.core.position + const { start, end } = bot.core.area + + if (!pos) return + + 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`) + }, + + move (pos = bot.position) { + bot.core.position = { + x: Math.floor(pos.x / 16) * 16, + y: 0, + z: Math.floor(pos.z / 16) * 16 + } + bot.core.refill() + }, + + currentBlock () { + const relativePosition = bot.core.currentBlockRelative + const corePosition = bot.core.position + if (!corePosition) return null + return { x: relativePosition.x + corePosition.x, y: relativePosition.y + corePosition.y, z: relativePosition.z + corePosition.z } + }, + + incrementCurrentBlock () { + const relativePosition = bot.core.currentBlockRelative + const { start, end } = bot.core.area + + relativePosition.x++ + + if (relativePosition.x > end.x) { + relativePosition.x = start.x + relativePosition.z++ + } + + if (relativePosition.z > end.z) { + relativePosition.z = start.z + relativePosition.y++ + } + + if (relativePosition.y > end.y) { + relativePosition.x = start.x + relativePosition.y = start.y + relativePosition.z = start.z + } + }, + + run (command) { + const location = bot.core.currentBlock() + if (!location) return + + bot._client.write('update_command_block', { command: command.substring(0, 32767), location, mode: 1, flags: 0b100 }) + + bot.core.incrementCurrentBlock() + } + } + + bot.on('move', () => { + bot.core.move(bot.position) + setTimeout(() => bot.core.run('say Hello, world!'), 1000) + }) +} + +module.exports = core; diff --git a/src/modules/command_loop.js b/src/modules/command_loop.js new file mode 100644 index 0000000..9498bfb --- /dev/null +++ b/src/modules/command_loop.js @@ -0,0 +1,17 @@ +function command_loop (bot, options, config) { + bot.cloop = { + list: [], + add (command, interval) { + this.list.push({ timer: setInterval(() => bot.core.run(command), interval), command, interval }) + }, + + remove (index) { + clearInterval(this.list[index].timer) + }, + clear () { + for (const cloop of this.list) clearInterval(cloop.timer) + this.list = [] + } + } +} +module.exports = command_loop; diff --git a/src/modules/command_manager.js b/src/modules/command_manager.js new file mode 100644 index 0000000..c0a954a --- /dev/null +++ b/src/modules/command_manager.js @@ -0,0 +1,96 @@ +const fs = require('fs'); +const path = require('path'); +const CommandError = require('../util/command_error.js'); +const CommandSource = require('../util/command_source'); +function command_manager (bot, options, config, discordClient) { + bot.commandManager = { + commands: {}, + commandlist: [], + execute (source, commandName, args) { + const command = this.getCommand(commandName.toLowerCase()) + + try { + if (!command || !command.execute) throw new CommandError({ translate: 'Unknown command: %s', with: [commandName] }) + if (command.trustLevel === 1 && bot.trusted) { + const hash = args[0] + if (args.length === 0 && bot.trusted && bot.owner && !source.sources.console) throw new CommandError({ text: "Please provide an trusted or owner hash" }) + if (args[0] !== bot.trusted && args[0] !== bot.owner && !source.sources.console) throw new CommandError({ translate: 'Invalid trusted or owner hash', color: 'dark_red' }) + } + if (command.trustLevel === 2 && bot.owner) { + if (args.length === 0 && bot.owner) throw new CommandError({ text: "Please provide an owner hash" }) + if (args[0] !== bot.owner) throw new CommandError({ translate: 'Invalid owner hash', color: 'dark_red' }) + } else if (command.trustLevel === 3 && !source.sources.console) { + throw new CommandError('This command can only be ran via console'); + } + if (!command.discordExecute && command && source.sources.discord) { + throw new CommandError(`${command.name} command is not supported in discord!`) + } else if (command.discordExecute && command && source.sources.discord) { + return command.discordExecute({ bot, source, arguments: args, config, discordClient }) + } else if (command.execute && command && !source.sources.discord) { + return command.execute({ bot, source, arguments: args, config, discordClient}) + } + } catch (error) { + console.error(error) + if (error instanceof CommandError) bot.tellraw("@a", { text: error.message, color: "dark_red" }) //bot.tellraw({ text: `${}`, color: "dark_red" }) + else bot.tellraw("@a", { translate: 'command.failed', color: "dark_red", hoverEvent: { action: 'show_text', contents: `${error.stack}` } }) + } + }, + executeString (source, command) { + const [commandName, ...args] = command.split(' ') + return this.execute(source, commandName, args) + }, + + discordExecute(source, command) { + const [commandName, ...args] = command.split(" "); + if (source?.sources?.discord && !source.sources.console) { + return this.discordExecute(source, commandName, args) + } + }, + register (command) { + this.commands[command.name] = command + if (command.aliases) { + command.aliases.map((a) => (this.commands[a] = command)); + } + }, + + getCommand (name) { + return this.commands[name] + }, + + getCommands () { + return Object.values(this.commands) + } + } + + commandlist = []; + for (const filename of fs.readdirSync(path.join(__dirname, '../commands'))) { + try { + const command = require(path.join(__dirname, '../commands', filename)) + bot.commandManager.register(command) + bot.commandManager.commandlist.push(command) + } catch (error) { + console.error('Failed to load command', filename, ':', error) + } + } + let ratelimit = 0; + bot.on("parsed_message", (data) => { + if (data.type !== "minecraft:chat") return; + const prefixes = config.prefixes; + prefixes.map((prefix) => { + const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString(); + if (!plainMessage.startsWith(prefix)) return + const command = plainMessage.substring(prefix.length) + const source = new CommandSource(data.sender, { discord: false, console: false }, true) + ratelimit++ + setTimeout(() => { + ratelimit-- + }, 1000) + if (ratelimit > 2) { + bot.tellraw(`@a[name="${source?.player?.profile?.name}"]`, { text: 'You are using commands too fast!', color: 'dark_red'}) + } else { + bot.commandManager.executeString(source, command) + } + }) + }) +} +module.exports = command_manager; diff --git a/src/modules/console.js b/src/modules/console.js new file mode 100644 index 0000000..105fc3d --- /dev/null +++ b/src/modules/console.js @@ -0,0 +1,50 @@ +const CommandSource = require('../util/command_source') +function CommandConsole (bot, options, config) { + bot.console = { + readline: null, + + consoleServer: 'all', + + useReadlineInterface (rl) { + this.readline = rl + + rl.on('line', line => { + if (bot.options.host !== this.consoleServer && this.consoleServer !== 'all') return +// bot.commandManager.executeString(bot.console.source, line) + if (line.startsWith('c.')) { + return bot.commandManager.executeString(bot.console.source, line.substring(2)) + } if (line.startsWith("")) { + return bot.commandManager.executeString(bot.console.source, `echo ${line.substring(0)}`) + } + }) + + rl.on('close', () => { + this.readline = null + }) + + const originalConsole = console + this.log = (...args) => { + rl.output.write('\x1b[2K\r') + originalConsole.log(args.toString()) + rl._refreshLine() + } + } + } + bot.console.logs = function log (message) { + console.log(`[${new Date().toLocaleString("en-US", { timeZone:"America/CHICAGO" })}] [${options.host}:${options.port}] ${message}`) + } + bot.console.source = new CommandSource(null, { console: true, discord: false }); + bot.console.source.sendFeedback = message => { + const ansi = bot.getMessageAsPrismarine(message)?.toAnsi() + bot.console.logs(ansi) +// cosnole.log(ansi) + } + + bot.on('message', message => { + const ansi = bot.getMessageAsPrismarine(message)?.toAnsi() + const string = bot.getMessageAsPrismarine(message)?.toString() + bot.console.logs(`${ansi}`) +// this.log('sus') + }) +} +module.exports = CommandConsole; diff --git a/src/modules/discord.js b/src/modules/discord.js new file mode 100644 index 0000000..df2f458 --- /dev/null +++ b/src/modules/discord.js @@ -0,0 +1,182 @@ +// TODO: Maybe move client creation elsepwhere +const { Client, GatewayIntentBits, interaction } = require('discord.js') +const { MessageContent, GuildMessages, Guilds } = GatewayIntentBits +const fixansi = require('../util/ansi'); +const CommandSource = require('../util/command_source') + +const client = new Client({ intents: [Guilds, GuildMessages, MessageContent] }) +const util = require('util') + +function discord(bot, options, config, discordClient) { +// client.login(config.discord.token) + if (!options?.channelId) { + bot.discord = { + invite: config.discord?.invite + } + return + } + bot.discord = { + client: discordClient, + channel: undefined, + invite: config.discord.invite || undefined, + prefix: config.discord.prefix, +// presence: bot.discord.presence, + token: config.discord.token, + } + discordClient.on('ready', (context) => { + bot.discord.channel = discordClient.channels.cache.get(options.channelId) +/* client.user.setPresence({ + activities: [{ + name: `${bot.discord.presence.name}`, + type: bot.discord.presence.type + }], + status: `${bot.discord.presence.status}` + });*/ + }) + + let discordQueue = [] + setInterval(() => { + if (discordQueue.length === 0) return + try { + bot?.discord?.channel?.send(`\`\`\`ansi\n${discordQueue.join('\n').substring(0, 1984)}\n\`\`\``) + } catch (error) { + bot.console.error(error.stack) + + } + discordQueue = [] + }, 2000) + + function sendDiscordMessage(message) { + discordQueue.push(message) + } + + function sendComponent(message) { + const ansi = bot.getMessageAsPrismarine(message)?.toAnsi().replaceAll('```\u001b[9```' + '```\u001b[3```').replaceAll('https://discord','https:\rdiscord')?.replaceAll('discord.gg', 'discord.\rgg'); + try { + sendDiscordMessage(fixansi(ansi.replaceAll('`', '`\u200b'))) + } catch (e) { + bot.console.error(`Error sending a message to Discord:\n${e.message}`) + sendDiscordMessage(e.message) + } + } + bot.on('message', message => { + sendComponent(message) + }) + + function messageCreate(message, source) { + bot.discord.Message = message + if (message.author.id === bot.discord.client.user.id) return + + if (message.channel.id !== bot.discord.channel.id) return + + if (message.content.startsWith(config.discord.prefix)) { // TODO: Don't hardcode this + const source = new CommandSource({ + profile: { + name: message?.member?.displayName + } + }, { + discord: true, + console: false + }, false, message) + + bot.sendFeedback = message => { + sendComponent(message) + } + + bot.commandManager.executeString(source, message.content.substring(config.discord.prefix.length)) + return + } + const tag = { + translate: '[%s] %s \u203a %s', + with: [{ + translate: '%s%s%s %s', + bold: false, + with: [{ + text: 'FNF', + bold: false, + color: 'blue' + }, + { + text: 'Boyfriend', + bold: false, + color: 'dark_aqua' + }, + { + text: 'Bot', + bold: false, + color: 'dark_blue' + }, + { + text: 'Discord', + bold: false, + color: 'dark_blue' + } + ], + clickEvent: bot.discord.invite ? { + action: 'open_url', + value: bot.discord.invite + } : undefined, + hoverEvent: { + action: 'show_text', + contents: 'Click to join the discord' + } + }, + { + text: message?.member?.displayName + }, + message.content + ] + } + if (message.attachments.size > 0) { + message.attachments.forEach(Attachment => { + bot.tellraw('@a', [tag, { + text: ' ' ? ' [Attachment] ' : ' [Attachment] ', + hoverEvent: { + action: 'show_text', + contents: 'Click here to view attachment' + }, + clickEvent: { + action: 'open_url', + value: `${Attachment.url}` + } + }]) + }) + } else { + bot.tellraw('@a', tag); + } + } + discordClient.on('messageCreate', messageCreate) + + process.on("uncaughtException", (e) => { + // sendDiscordMessage("uncaught " + e.stack); + }); + +/* + function fixansi(message) { + const ansilist = { + "\x1B\[93m": "\x1B[33m", // Yellow + "\x1B\[96m": "\x1B[36m", // Blue + "\x1B\[94m": "\x1B[34m", // Discord Blue + "\x1B\[90m": "\x1B[30m", // Gray + "\x1B\[91m": "\x1B[31m", // Light Red + "\x1B\[95m": "\x1B\[35m", // Pink + "\x1B\[92m": "\x1B\[32m", // Green + "\x1B\[0m": "\x1B\[0m\x1B\[37m", // White + "\x1B\[97m": "\x1B\[0m\x1B\[37m", // White + }; + let i = message; + + for (const ansi in ansilist) { + if (ansilist.hasOwnProperty(ansi)) { + i = i.replace(new RegExp(escapeRegExpChars(ansi), 'g'), ansilist[ansi]); + + function escapeRegExpChars(text) { + return text.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + } + } + + return i; + }*/ +} +module.exports = discord; diff --git a/src/modules/player_list.js b/src/modules/player_list.js new file mode 100644 index 0000000..a2ae2c0 --- /dev/null +++ b/src/modules/player_list.js @@ -0,0 +1,81 @@ +function player_list (bot, options, config) { + bot.players = [] + + bot.on('packet.player_info', packet => { + const actions = [] + + if (packet.action & 0b000001) actions.push(addPlayer) + if (packet.action & 0b000010) actions.push(initializeChat) + if (packet.action & 0b000100) actions.push(updateGamemode) + if (packet.action & 0b001000) actions.push(updateListed) + if (packet.action & 0b010000) actions.push(updateLatency) + if (packet.action & 0b100000) actions.push(updateDisplayName) + + for (const entry of packet.data) { + for (const action of actions) { + action(entry) + } + } + }) + + bot.on('packet.player_remove', ({ players }) => { + // TODO: Add player removal (with validation) + for (const player of players) { + bot.players = bot.players.filter(entry => entry.uuid !== player) + } + }) + + function addPlayer (entry) { + bot.players = bot.players.filter(_entry => _entry.uuid !== entry.uuid) + bot.players.push({ + uuid: entry.uuid, + profile: { name: entry.player.name, properties: entry.player.properties }, + + chatSession: undefined, + gamemode: undefined, + listed: undefined, + latency: undefined, + displayName: undefined + }) + } + + function initializeChat (entry) { + // TODO: Handle chat sessions + } + + function updateGamemode (entry) { + const target = bot.players.find(_entry => _entry.uuid === entry.uuid) + if (!target) return + + target.gamemode = entry.gamemode + } + + function updateListed (entry) { + const target = bot.players.find(_entry => _entry.uuid === entry.uuid) + if (!target) return + + target.listed = entry.listed + } + + function updateLatency (entry) { + const target = bot.players.find(_entry => _entry.uuid === entry.uuid) + if (!target) return + + target.latency = entry.latency + } + + function updateDisplayName (entry) { + const target = bot.players.find(_entry => _entry.uuid === entry.uuid) + if (!target) return + + try { + target.displayName = JSON.parse(entry.displayName) + } catch { + // do nothing + } + } + + bot.on('end', () => (bot.players = [])) +} + +module.exports = player_list; diff --git a/src/modules/position.js b/src/modules/position.js new file mode 100644 index 0000000..7170bcd --- /dev/null +++ b/src/modules/position.js @@ -0,0 +1,19 @@ +function position (bot, options, config) { + bot.position = null + + bot.on('packet.position', packet => { + bot.position = { + x: packet.flags & 1 ? (this.x + packet.x) : packet.x, + y: packet.flags & 2 ? (this.y + packet.y) : packet.y, + z: packet.flags & 4 ? (this.z + packet.z) : packet.z + } + + bot._client.write('teleport_confirm', { teleportId: packet.teleportId }) + + bot.emit('move') + }) + + bot.on('end', () => { bot.position = null }) +} + +module.exports = position diff --git a/src/modules/reconnect.js b/src/modules/reconnect.js new file mode 100644 index 0000000..2a9a405 --- /dev/null +++ b/src/modules/reconnect.js @@ -0,0 +1,14 @@ +const mc = require('minecraft-protocol') + +function reconnect (bot, options) { + bot.reconnectDelay = options.reconnectDelay ?? 5000 + + bot.on('end', () => { + if (bot.reconnectDelay < 0) return + + bot._client = mc.createClient(options) + bot.emit('init_client', bot._client) + }) +} + +module.exports = reconnect; diff --git a/src/modules/registry.js b/src/modules/registry.js new file mode 100644 index 0000000..ffe3bb0 --- /dev/null +++ b/src/modules/registry.js @@ -0,0 +1,10 @@ +const createRegistry = require('prismarine-registry') + +function registry (bot) { + bot.on('packet.login', packet => { + bot.registry = createRegistry(bot._client.version) + bot.emit('registry_ready', bot.registry) + }) +} + +module.exports = registry; diff --git a/src/modules/selfcare.js b/src/modules/selfcare.js new file mode 100644 index 0000000..f1fe9f6 --- /dev/null +++ b/src/modules/selfcare.js @@ -0,0 +1,53 @@ +function selfcare (bot, options, config) { + let entityId; + let permissionLevel = 2; + let gameMode; + let commandSpy = false; + let vanished = false; + let prefix = false; + // You now have the tag: &8[&bPrefix&8: &3~&8] + // You no longer have a tag + bot.on('message', (message) => { + const stringMessage = bot.getMessageAsPrismarine(message).toString(); + if (stringMessage.startsWith("Successfully enabled CommandSpy")) commandSpy = true; + else if (stringMessage?.startsWith("Successfully disabled CommandSpy")) commandSpy = false; + else if (stringMessage === `Vanish for ${bot.options.username}: enabled`) vanished = true; + else if (stringMessage === `Vanish for ${bot.options.username}: disabled`) vanished = false; + else if (stringMessage === `You now have the tag: &8[&bPrefix&8: &3${config.prefixes[0]}&8]` || stringMessage === "Something went wrong while saving the prefix. Please check console.") prefix = true; + else if (stringMessage?.startsWith("You now have the tag: ") || stringMessage === "You no longer have a tag") prefix = false + }) + // else if (stringmessage?.startsWith("You now have the tag: ") || JSON?.stringify(message) === '{"text":"You no longer have a tag"}') prefix = false + bot.on('packet.entity_status', packet => { + if (packet.entityId !== entityId || packet.entityStatus < 24 || packet.entityStatus > 28) return + permissionLevel = packet.entityStatus - 24 + }) + bot.on('packet.game_state_change', packet => { + if (packet.reason !== 3) return // Reason 3 = Change Game Mode + // if (packet.reason !== 4) return // Reason 4 = end credits + gameMode = packet.gameMode; + }); + bot.on("packet.game_state.change", packet => { + + }) + let timer; + bot.on('packet.login', (packet) => { + entityId = packet.entityId; + gameMode = packet.gameMode; + timer = setInterval(() => { + 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 (!vanished) bot.core.run(`vanish ${bot.options.username} on`); + else if (!prefix) bot.chat.command(`prefix &8[&bPrefix&8: &3${config.prefixes[0]}&8]`); + else if (gameMode !== 4) bot._client.write("client_command", { actionId: 0 }); + }, 1000); + }); + bot.on('end', () => { + if (timer) clearInterval(timer) + prefix = false; + commandSpy = false; + vanished = false; + prefix = false; + }); +} +module.exports = selfcare; diff --git a/src/modules/tellraw.js b/src/modules/tellraw.js new file mode 100644 index 0000000..741bf15 --- /dev/null +++ b/src/modules/tellraw.js @@ -0,0 +1,6 @@ +function tellraw (bot, options, config) { + bot.tellraw = (selector, message) => { + bot.core.run(`minecraft:tellraw ${selector} ` + JSON.stringify(message)) + } +} +module.exports = tellraw; diff --git a/src/modules/validation.js b/src/modules/validation.js new file mode 100644 index 0000000..5f7a4e7 --- /dev/null +++ b/src/modules/validation.js @@ -0,0 +1,10 @@ +const crypto = require("crypto"); +function validation (bot, options, config) { + bot.trusted = ""; + let trusted; + let hashRegenInterval = setInterval(() => { + bot.trusted = crypto.createHash('sha256').update(Math.floor(Date.now() / 5000) + config.keys.trusted).digest('hex').substring(0, 16) + bot.owner = crypto.createHash('sha256').update(Math.floor(Date.now() / 5000) + config.keys.owner).digest('hex').substring(0, 16) + }, 2000) +} +module.exports = validation; diff --git a/src/util/ChatParsers/ChipmunkMod.js b/src/util/ChatParsers/ChipmunkMod.js new file mode 100644 index 0000000..52f3f35 --- /dev/null +++ b/src/util/ChatParsers/ChipmunkMod.js @@ -0,0 +1,35 @@ +function chipmunkmod (message, data, context, bot) { + try { + if (message === null || typeof message !== 'object') return + + if (message.with?.length < 3 || (message.translate !== '[%s] %s › %s' && message.translate !== '%s %s › %s')) return + + const senderComponent = message.with[1] + // wtf spam again - + //console.log(senderComponent)//wtf... + + + const contents = message.with[2] +// spam lol - console.log(contents) + let sender + + const hoverEvent = senderComponent.hoverEvent + //console.log(JSON.stringify(hoverEvent)) + if (hoverEvent?.action === 'show_entity') { + const id = hoverEvent.contents.id +// + sender = data.players.find(player => player.uuid === id) + } else { + const stringUsername = data.getMessageAsPrismarine(senderComponent).toString() // TypeError: data.getMessageAsPrismarine is not a function + + sender = data.players.find(player => player.profile.name) //=== stringusername) + } + + if (!sender) return null + + return { sender, contents, type: 'minecraft:chat', senderComponent } + } catch(e) { + console.error(e) + } +} +module.exports = chipmunkmod diff --git a/src/util/ChatParsers/Kaboom.js b/src/util/ChatParsers/Kaboom.js new file mode 100644 index 0000000..880b5bf --- /dev/null +++ b/src/util/ChatParsers/Kaboom.js @@ -0,0 +1,41 @@ +const util = require('util') + +function parseMessage (message, data) { + if (message === null || typeof message !== 'object') return + + if (message.text !== '' || !Array.isArray(message.extra) || message.extra.length < 3) return + + const children = message.extra + + const prefix = children[0] + let displayName = data.senderName ?? { text: '' } + let contents = { text: '' } + + if (isSeparatorAt(children, 1)) { // Missing/blank display name + if (children.length > 3) contents = children[3] + } else if (isSeparatorAt(children, 2)) { + displayName = children[1] + if (children.length > 4) contents = children[4] + } else { + return undefined + } + + const playerListDisplayName = { extra: [prefix, displayName], text: '' } + let sender + if (data.uuid) { + sender = data.players.find(player => player.uuid === data.senderUuid) + } else { + const playerListDisplayName = { extra: [prefix, displayName], text: '' } + sender = data.players.find(player => util.isDeepStrictEqual(player.displayName, playerListDisplayName)) + } + + if (!sender) return undefined + + return { sender, contents, type: 'minecraft:chat', displayName } +} + +function isSeparatorAt (children, start) { + return (children[start]?.text === ':' || children[start]?.text === '\xa7f:') && children[start + 1]?.text === ' ' +} + +module.exports = parseMessage diff --git a/src/util/ansi.js b/src/util/ansi.js new file mode 100644 index 0000000..cf22be2 --- /dev/null +++ b/src/util/ansi.js @@ -0,0 +1,26 @@ +function ansi (message) { + const ansilist = { + "\x1B\[93m": "\x1B[33m", // Yellow + "\x1B\[96m": "\x1B[36m", // Blue + "\x1B\[94m": "\x1B[34m", // Discord Blue + "\x1B\[90m": "\x1B[30m", // Gray + "\x1B\[91m": "\x1B[31m", // Light Red + "\x1B\[95m": "\x1B\[35m", // Pink + "\x1B\[92m": "\x1B\[32m", // Green + "\x1B\[0m": "\x1B\[0m\x1B\[37m", // White + "\x1B\[97m": "\x1B\[0m\x1B\[37m", // White + }; + let i = message; + + for (const ansi in ansilist) { + if (ansilist.hasOwnProperty(ansi)) { + i = i.replace(new RegExp(escapeRegExpChars(ansi), 'g'), ansilist[ansi]); + + function escapeRegExpChars(text) { + return text.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + } + } + } + return i; +} +module.exports = ansi; diff --git a/src/util/command_error.js b/src/util/command_error.js new file mode 100644 index 0000000..551c58a --- /dev/null +++ b/src/util/command_error.js @@ -0,0 +1,16 @@ +// TODO: Improve how messages are stringified +const ChatMessage = require('prismarine-chat')('1.20.1') +const stringify = message => new ChatMessage(message).toString() + +class CommandError extends Error { + constructor (message, filename, lineError) { + super(stringify(message), filename, lineError) + this.name = 'CommandError' + this._message = message + } + + get message () { + return stringify(this._message) + } +} +module.exports = CommandError diff --git a/src/util/command_source.js b/src/util/command_source.js new file mode 100644 index 0000000..4ec2b90 --- /dev/null +++ b/src/util/command_source.js @@ -0,0 +1,14 @@ +class CommandSource { + constructor (player, sources) { + 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 new file mode 100644 index 0000000..b5096b1 --- /dev/null +++ b/src/util/loadModules.js @@ -0,0 +1,20 @@ +const fs = require("fs"); +const path = require("path"); +const readline = require("readline"); +/*const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, +})*/ +function loadModules (bot, options, config, discordClient) { + bot.loadModule = module => module(bot, options, config, discordClient) + + for (const filename of fs.readdirSync(path.join(__dirname, '../', 'modules'))) { + try { + const module = require(path.join(__dirname, '../', 'modules', filename)) + bot.loadModule(module) + } catch (error) { + console.error('Failed to load module', filename, ':', error) + } + } +} +module.exports = loadModules; diff --git a/src/util/usernameGen.js b/src/util/usernameGen.js new file mode 100644 index 0000000..947a534 --- /dev/null +++ b/src/util/usernameGen.js @@ -0,0 +1,10 @@ +function usernameGen () { + const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; + let username = ''; + for (let i = 0; i < 10; i++ ) { + const randomIndex = Math.floor(Math.random() * characters.length); + username += characters[randomIndex]; + } + return username; + } +module.exports = usernameGen;