Skip to content

Use in function #12

Description

@MTRNord

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);
    });
  },

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions