fix: Still showing log even though checkUpdate is false
This commit is contained in:
parent
4b329c8105
commit
c902304236
@ -536,6 +536,7 @@ class Client extends BaseClient {
|
||||
try {
|
||||
const latest_tag = res_.data['dist-tags'].latest;
|
||||
this.emit('update', Discord.version, latest_tag);
|
||||
this.emit('debug', `${chalk.greenBright('[OK]')} Check Update success`);
|
||||
} catch {
|
||||
this.emit('debug', `${chalk.redBright('[Fail]')} Check Update error`);
|
||||
this.emit('update', Discord.version, false);
|
||||
|
@ -42,6 +42,7 @@ function patchVoice(client) {
|
||||
|
||||
module.exports = async (client, { d: data }, shard) => {
|
||||
if (!firstReady) {
|
||||
if (client.options.checkUpdate) {
|
||||
client.once('update', (currentVersion, newVersion) => {
|
||||
if (!newVersion) {
|
||||
console.log(`
|
||||
@ -85,8 +86,6 @@ module.exports = async (client, { d: data }, shard) => {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
if (client.options.checkUpdate === false) {
|
||||
client.checkUpdate();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user