From 6b0b670488a9ac0c32473dafe8ab765747f8a0f7 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 6 May 2022 17:45:16 +0700 Subject: [PATCH] Notify only when a new version is available #91 --- src/client/websocket/handlers/READY.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/client/websocket/handlers/READY.js b/src/client/websocket/handlers/READY.js index 37853c3..966f5d3 100644 --- a/src/client/websocket/handlers/READY.js +++ b/src/client/websocket/handlers/READY.js @@ -6,7 +6,7 @@ const chalk = require('chalk'); const Discord = require('../../../index'); const { Events } = require('../../../util/Constants'); -const checkUpdate = async () => { +async function checkUpdate() { const res_ = await axios.get(`https://registry.npmjs.com/${encodeURIComponent('discord.js-selfbot-v13')}`); const lastest_tag = res_.data['dist-tags'].latest; // Checking if the package is outdated @@ -15,10 +15,14 @@ const checkUpdate = async () => { return console.log(`${chalk.yellowBright('[WARNING]')} New Discord.js-selfbot-v13 version. Old Version: ${chalk.redBright(Discord.version)} => New Version: ${chalk.greenBright(lastest_tag)}`); } - return console.log( + /* + Removed: + console.log( `${chalk.greenBright('[OK]')} Discord.js-selfbot-v13 is up to date. Version: ${chalk.blueBright(Discord.version)}`, ); -}; + */ + return null; +} module.exports = (client, { d: data }, shard) => { if (client.options.checkUpdate) {