mirror of
https://github.com/Expand-sys/ccashbot
synced 2025-12-16 23:52:14 +11:00
made it actually display the response
This commit is contained in:
parent
ef7bad03f9
commit
de9f8eaa48
1 changed files with 11 additions and 3 deletions
|
|
@ -21,13 +21,21 @@ module.exports = {
|
|||
port: `${process.env.RCON_PORT}`,
|
||||
password: `${rconpass}`,
|
||||
});
|
||||
|
||||
await rcon.connect();
|
||||
let connected = true
|
||||
let error
|
||||
try{
|
||||
await rcon.connect();
|
||||
} catch(e){
|
||||
console.log(e)
|
||||
connected = false
|
||||
error = e
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue