dont print disconnected if quitting
This commit is contained in:
parent
b988416ae3
commit
8ea671bad3
2 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
const {addCommand} = require("../lib/command");
|
||||
|
||||
addCommand("q", "quit comcord", function () {
|
||||
comcord.state.quitting = true;
|
||||
comcord.client.disconnect({reconnect: false});
|
||||
process.exit(0);
|
||||
});
|
||||
|
|
|
@ -125,8 +125,10 @@ client.on("ready", function () {
|
|||
}
|
||||
});
|
||||
client.on("disconnect", function () {
|
||||
if (!comcord.state.quitting) {
|
||||
comcord.state.connected = false;
|
||||
console.log("% Disconnected, retrying...");
|
||||
}
|
||||
});
|
||||
|
||||
rpc.on("connected", function () {
|
||||
|
|
Loading…
Reference in a new issue