node-modern-rcon icon indicating copy to clipboard operation
node-modern-rcon copied to clipboard

UnhandledPromiseRejectionWarning

Open vertex101 opened this issue 5 years ago • 3 comments

I am trying to use this here to connect to a minecraft server so i am able to run commands to the server from a twitch chat and i am getting these errors

[23:51] info: [#sketch] <vertex101>: !wadd vertex101 (node:5784) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED <IPADDRESS>:<PORT> at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14) (node:5784) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:5784) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

and was wondering what i am doing wrong

vertex101 avatar Jul 06 '19 03:07 vertex101

Can you please post the relevant code?

levrik avatar Jul 06 '19 06:07 levrik

i forgot to post here but i did resolve the issue as i had the rcon enabled but didnt have query enabled and that needed to be enabled for it to work that is what was causing the error

vertex101 avatar Jul 06 '19 20:07 vertex101

but for the code here is the code https://github.com/vertex101/MyTwitchBot/blob/master/bot.js and the code for the rcon starts at line 162

vertex101 avatar Jul 06 '19 20:07 vertex101