skykings-network / hypixel-chat-bot Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
PM2 | 2024-05-04T20:13:54: PM2 log: App [sr-BridgeBot:0] exited with code [0] via signal [SIGINT]
PM2 | 2024-05-04T20:13:54: PM2 log: pid=10172 msg=process killed
PM2 | 2024-05-04T20:18:38: PM2 log: App [sr-BridgeBot:1] starting in -fork mode-
PM2 | 2024-05-04T20:18:38: PM2 log: App [sr-BridgeBot:1] online
PM2 | 2024-05-04T20:19:30: PM2 log: Stopping app:sr-BridgeBot id:1
PM2 | 2024-05-04T20:19:30: PM2 log: App [sr-BridgeBot:1] exited with code [0] via signal [SIGINT]
PM2 | 2024-05-04T20:19:30: PM2 log: pid=10279 msg=process killed
PM2 | 2024-05-04T20:19:36: PM2 log: App [index:2] starting in -fork mode-
PM2 | 2024-05-04T20:19:36: PM2 log: App [index:2] online
PM2 | 2024-05-04T20:20:02: PM2 log: Stopping app:index id:2
PM2 | 2024-05-04T20:20:02: PM2 log: pid=10322 msg=failed to kill - retrying in 100ms
PM2 | 2024-05-04T20:20:02: PM2 log: App [index:2] exited with code [0] via signal [SIGINT]
PM2 | 2024-05-04T20:20:02: PM2 log: pid=10322 msg=process killed
PM2 | 2024-05-04T20:32:24: PM2 log: App [sr-BridgeBot:0] starting in -fork mode-
PM2 | 2024-05-04T20:32:24: PM2 log: App [sr-BridgeBot:0] online
/root/.pm2/logs/sr-BridgeBot-out.log last 15 lines:
0|sr-Bridg | at MsAuthFlow.initTokenCaches (/root/bridges/bridgebots/sr-Bridgebot/Hypixel-Chat-Bot/node_modules/minecraft-protocol/src/client/authFlow.js:43:12)
0|sr-Bridg | at new MsAuthFlow (/root/bridges/bridgebots/sr-Bridgebot/Hypixel-Chat-Bot/node_modules/minecraft-protocol/src/client/authFlow.js:33:10)
0|sr-Bridg | at authenticateDeviceCode (/root/bridges/bridgebots/sr-Bridgebot/Hypixel-Chat-Bot/node_modules/minecraft-protocol/src/client/microsoftAuth.js:108:18)
0|sr-Bridg | at Object.authenticatePassword (/root/bridges/bridgebots/sr-Bridgebot/Hypixel-Chat-Bot/node_modules/minecraft-protocol/src/client/microsoftAuth.js:77:18)
0|sr-Bridg | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
0|sr-Bridg | errno: -2,
0|sr-Bridg | syscall: 'mkdir',
0|sr-Bridg | code: 'ENOENT',
0|sr-Bridg | path: '/root/.minecraft/nmp-cache'
0|sr-Bridg | }
0|sr-Bridg | [20:32] Discord > Client ready, logged in as GuildBridgeBot#5072
0|sr-Bridg | [msa] First time signing in. Please authenticate now:
0|sr-Bridg | undefined
0|sr-Bridg | {"errorCode":"invalid_grant","errorMessage":"7000014 - [2024-05-04 20:32:28Z]: AADSTS7000014: The provided value for the input parameter 'device_code' is not valid. Trace ID: 897b29d0-15d3-4fe1-8281-62c6441ac301 Correlation ID: 1122948a-93aa-4293-ad62-ee3a6c3bf37c Timestamp: 2024-05-04 20:32:28Z - Correlation ID: 1122948a-93aa-4293-ad62-ee3a6c3bf37c - Trace ID: 897b29d0-15d3-4fe1-8281-62c6441ac301","subError":"","name":"ServerError"}
0|sr-Bridg | [20:32] Error > ServerError: invalid_grant: 7000014 - [2024-05-04 20:32:28Z]: AADSTS7000014: The provided value for the input parameter 'device_code' is not valid. Trace ID: 897b29d0-15d3-4fe1-8281-62c6441ac301 Correlation ID: 1122948a-93aa-4293-ad62-ee3a6c3bf37c Timestamp: 2024-05-04 20:32:28Z - Correlation ID: 1122948a-93aa-4293-ad62-ee3a6c3bf37c - Trace ID: 897b29d0-15d3-4fe1-8281-62c6441ac301
/root/.pm2/logs/sr-BridgeBot-error.log last 15 lines:
0|sr-Bridg | }
0|sr-Bridg | [msa] Error getting device code
0|sr-Bridg | ServerError: invalid_grant: 7000014 - [2024-05-04 20:32:28Z]: AADSTS7000014: The provided value for the input parameter 'device_code' is not valid. Trace ID: 897b29d0-15d3-4fe1-8281-62c6441ac301 Correlation ID: 1122948a-93aa-4293-ad62-ee3a6c3bf37c Timestamp: 2024-05-04 20:32:28Z - Correlation ID: 1122948a-93aa-4293-ad62-ee3a6c3bf37c - Trace ID: 897b29d0-15d3-4fe1-8281-62c6441ac301
0|sr-Bridg | at ServerError.AuthError [as constructor] (/root/bridges/bridgebots/sr-Bridgebot/Hypixel-Chat-Bot/node_modules/@azure/msal-common/dist/index.js:398:24)
0|sr-Bridg | at new ServerError (/root/bridges/bridgebots/sr-Bridgebot/Hypixel-Chat-Bot/node_modules/@azure/msal-common/dist/index.js:2730:28)
0|sr-Bridg | at ResponseHandler.validateTokenResponse (/root/bridges/bridgebots/sr-Bridgebot/Hypixel-Chat-Bot/node_modules/@azure/msal-common/dist/index.js:4118:19)
0|sr-Bridg | at DeviceCodeClient.<anonymous> (/root/bridges/bridgebots/sr-Bridgebot/Hypixel-Chat-Bot/node_modules/@azure/msal-common/dist/index.js:4605:41)
0|sr-Bridg | at step (/root/bridges/bridgebots/sr-Bridgebot/Hypixel-Chat-Bot/node_modules/@azure/msal-common/dist/index.js:79:23)
0|sr-Bridg | at Object.next (/root/bridges/bridgebots/sr-Bridgebot/Hypixel-Chat-Bot/node_modules/@azure/msal-common/dist/index.js:60:53)
0|sr-Bridg | at fulfilled (/root/bridges/bridgebots/sr-Bridgebot/Hypixel-Chat-Bot/node_modules/@azure/msal-common/dist/index.js:50:58)
0|sr-Bridg | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
0|sr-Bridg | errorCode: 'invalid_grant',
0|sr-Bridg | errorMessage: "7000014 - [2024-05-04 20:32:28Z]: AADSTS7000014: The provided value for the input parameter 'device_code' is not valid. Trace ID: 897b29d0-15d3-4fe1-8281-62c6441ac301 Correlation ID: 1122948a-93aa-4293-ad62-ee3a6c3bf37c Timestamp: 2024-05-04 20:32:28Z - Correlation ID: 1122948a-93aa-4293-ad62-ee3a6c3bf37c - Trace ID: 897b29d0-15d3-4fe1-8281-62c6441ac301",
0|sr-Bridg | subError: ''
0|sr-Bridg | }
I was confused for the longest time why the bot kept crashing, found where the error was in the logs and started testing.
Hypixel-Chat-Bot/src/minecraft/handlers/ChatHandler.js
Lines 202 to 212 in 6ebe244
In this handler the bot does indeed work when going through the if-statement, but user
being defined in the if-statement causes it to not work. What I did to fix this was putting let user = "";
before the if-statement, and then just having user = message.split(' ')[1];
on the inside.
This could be an error with versions I'm not sure, but I figured I should let you know so that it can be fixed as it's relatively simple.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.