levrik/node-modern-rcon

UnhandledPromiseRejectionWarning

Opened this issue · 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

Can you please post the relevant code?

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

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