From a344df8cccbb314ee754a3b1c5b9a5f037959680 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Wed, 15 Jun 2022 18:35:32 +0700 Subject: [PATCH] refactor(Event): Update Events --- src/client/websocket/handlers/READY.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/client/websocket/handlers/READY.js b/src/client/websocket/handlers/READY.js index ca00f1e..d9fa50f 100644 --- a/src/client/websocket/handlers/READY.js +++ b/src/client/websocket/handlers/READY.js @@ -11,7 +11,8 @@ const { Networking } = require('../../../util/Voice'); /** * Emitted whenever clientOptions.checkUpdate = true * @event Client#update - * @param {string} data Log data :)) ehe + * @param {string} oldVersion Log data :v + * @param {string} newVersion Log data :)) ehe */ async function checkUpdate(client) { @@ -22,19 +23,7 @@ async function checkUpdate(client) { return client.emit('update', `${chalk.redBright('[Fail]')} Check Update error`); } const lastest_tag = res_.data['dist-tags'].latest; - // Checking if the package is outdated - // Stable version - if (lastest_tag !== Discord.version && Discord.version.includes('-') == false) { - return client.emit( - 'update', - `${chalk.yellowBright('[WARNING]')} New Discord.js-selfbot-v13 version. -Old Version: ${chalk.redBright(Discord.version)} => New Version: ${chalk.greenBright(lastest_tag)}`, - ); - } - client.emit( - 'update', - `${chalk.greenBright('[OK]')} Discord.js-selfbot-v13 is up to date. Version: ${chalk.blueBright(Discord.version)}`, - ); + client.emit('update', Discord.version, lastest_tag); return null; }