made it actually display the response

This commit is contained in:
Expand-sys 2022-12-26 15:12:41 +11:00
parent ef7bad03f9
commit de9f8eaa48

View file

@ -21,13 +21,21 @@ module.exports = {
port: `${process.env.RCON_PORT}`,
password: `${rconpass}`,
});
let connected = true
let error
try{
await rcon.connect();
} catch(e){
console.log(e)
connected = false
error = e
}
await rcon.connect();
let content = message.content.split("!whitelist ")[1];
console.log(content);
let res = await rcon.send(`whitelist add ${content}`);
message.reply(`whitelisted ${content}`);
message.reply(`${res}`);
rcon.end();
}
},