Open Meow-Bots opened 2 years ago
it works when the command is from the .js but when i sent the command from my rcon it just doesnt work.
I don't follow, can you clarify which cases are working and which are not?
One piece of standard advice is to make sure you're sending the command after the authentication callback happens, for example:
UwU.on('auth', function() {
console.log("Authenticated <3");
UwU.send("help");
}).on('response', function(str) {
console.log("Got response: " + str);
}).on('end', function() {
console.log("Socket closed!");
});
what I meant is, the commands only work when I put them in the js file like this is my js
var Rcon = require('/home/kibee/node_modules/rcon/node-rcon')
var options = {
tcp: true,
challenge: false
};
var UwU = new Rcon('ubuntu-ts.meowbot.moe', 32869, 'Lks1543562879@@', options);
UwU.on('auth', function() {
console.log("Authenticated <3");
console.log("Sending command: help")
UwU.send("/help");
}).on('response', function(str) {
console.log("Got response: " + str);
}).on('end', function() {
console.log("Socket closed!");
});
UwU.connect();
the /help command worked when i launch the js file but when i type /help, the command didnt send to the rcon server and nothing happened
This library doesn’t handle console input. Sending commands is left to the user. If you would like to send commands from console input, try out this example https://github.com/pushrax/node-rcon/blob/master/examples/stdio.js
I just tried the example, the most thing works fine but the backspace key doesn't work.
Which terminal software are you using? This code is supposed to handle backspace, but the escape code it's using may not be compatible with all terminals. https://github.com/pushrax/node-rcon/blob/a683f11dd6160fc4fe8ef46139413f862dabb238/examples/stdio.js#L58-L60
I was using Tabby Terminal, now I just tried on Windows PowerShell and it doesn't work either. Same thing with the Windows command prompt. When I press backspace I got this:
This is my .js
when i connect to the server it sent Authenticated <3, i also tried
UwU.send("help");
and it works when the command is from the .js but when i sent the command from my rcon it just doesnt work. its rcon for minecraft btw.