-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Here's my code:
rcon.connect().then(() => {
socket.emit(id,{msg:"Command sent", success:true})
rcon.command(cmd).then(() => {
console.log('ran command!');
});
}).catch(err => {
socket.emit(id,{msg:"Command failed, server may be offline or starting up", success:false})
})I want to move the socket.emit(id,{msg:"Command sent", success:true}) bit inside the command.then bit but it doesn't seem to be called. If I understand it correctly that section with the console.log('ran command!'); should be called after the command is successfully run on the server - but even though the command is run it doesn't seem to call the function.
I'm using latest GitHub version of course.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels