HI I have following code in module.exports and want to get the awnser from the server returned by the function. How can I do that? I tried to put the return in front of the connect but that did gave me the state of the connection.
status: function () {
rcon.connect().then(() => {
rcon.command('status').then(() => {
console.log('status check');
});
}).then(
() => rcon.disconnect()
).catch(err => {
console.log('caught', err);
console.log(err.stack);
});
},
HI I have following code in module.exports and want to get the awnser from the server returned by the function. How can I do that? I tried to put the return in front of the connect but that did gave me the state of the connection.