mirror of https://github.com/kry008/Bot-2.0.git
error check, if yes remove hello and goodbye
parent
ecaf3810d6
commit
d7ef54efee
|
@ -49,7 +49,13 @@ module.exports = {
|
|||
console.error("Welcome channel not found.");
|
||||
}
|
||||
})
|
||||
.catch(console.error);
|
||||
.catch(
|
||||
//if the channel is not found, set the welcome channel to null and hello to false
|
||||
data.helloChannel = null,
|
||||
data.hello = false,
|
||||
fs.writeFileSync(filePath, JSON.stringify(data))
|
||||
|
||||
);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,11 @@ module.exports = {
|
|||
console.error("Goodbye channel not found.");
|
||||
}
|
||||
})
|
||||
.catch(console.error);
|
||||
.catch(
|
||||
data.goodbyeChannel = null,
|
||||
data.goodbye = false,
|
||||
fs.writeFileSync(filePath, JSON.stringify(data))
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue