diff --git a/src/client/Client.js b/src/client/Client.js index 73d1224..4242f55 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -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); diff --git a/src/client/websocket/handlers/READY.js b/src/client/websocket/handlers/READY.js index f82f0ea..1bb50ad 100644 --- a/src/client/websocket/handlers/READY.js +++ b/src/client/websocket/handlers/READY.js @@ -42,9 +42,10 @@ function patchVoice(client) { module.exports = async (client, { d: data }, shard) => { if (!firstReady) { - client.once('update', (currentVersion, newVersion) => { - if (!newVersion) { - console.log(` + if (client.options.checkUpdate) { + client.once('update', (currentVersion, newVersion) => { + if (!newVersion) { + console.log(` ${chalk.redBright('[WARNING]')} Cannot check new Discord.js-selfbot-v13 version. Current: ${chalk.blueBright(currentVersion)} @@ -56,8 +57,8 @@ module.exports = async (client, { d: data }, shard) => { and using event update https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=e-update\n`); - } else if (currentVersion !== newVersion && !currentVersion.includes('-')) { - console.log(` + } else if (currentVersion !== newVersion && !currentVersion.includes('-')) { + console.log(` ${chalk.yellowBright('[WARNING]')} New Discord.js-selfbot-v13 version. Current: ${chalk.redBright(currentVersion)} => Latest: ${chalk.greenBright(newVersion)} @@ -69,9 +70,9 @@ module.exports = async (client, { d: data }, shard) => { and using event update https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=e-update\n`); - } else { - console.log( - ` + } else { + console.log( + ` ${chalk.greenBright('[OK]')} Discord.js-selfbot-v13 is up to date. Current: ${chalk.blueBright(currentVersion)} If you don't want to show this message, set ${chalk.cyanBright('checkUpdate')} to false @@ -82,11 +83,9 @@ module.exports = async (client, { d: data }, shard) => { and using event update https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=e-update\n`, - ); - } - }); - - if (client.options.checkUpdate === false) { + ); + } + }); client.checkUpdate(); }