Clear console.log, checkUpdate in ClientOptions
This commit is contained in:
@@ -3,10 +3,35 @@
|
||||
const ClientApplication = require('../../../structures/ClientApplication');
|
||||
const User = require('../../../structures/User');
|
||||
let ClientUser;
|
||||
const chalk = require('chalk');
|
||||
const axios = require('axios');
|
||||
const Discord = require('discord.js-selfbot-v13');
|
||||
|
||||
const checkUpdate = async () => {
|
||||
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
|
||||
// Stable version
|
||||
if (lastest_tag !== Discord.version) {
|
||||
return console.log(`${chalk.yellowBright(
|
||||
'[WARNING]',
|
||||
)} New Discord.js-selfbot-v13 Stable version.
|
||||
${chalk.redBright(Discord.version)} => ${chalk.greenBright(lastest_tag)}`);
|
||||
}
|
||||
return console.log(
|
||||
`${chalk.greenBright(
|
||||
'[OK]',
|
||||
)} Discord.js-selfbot-v13 [Stable] is up to date. Version: ${chalk.blueBright(
|
||||
Discord.version,
|
||||
)}`,
|
||||
);
|
||||
};
|
||||
|
||||
module.exports = (client, { d: data }, shard) => {
|
||||
// console.log(data);
|
||||
|
||||
if (client.options.checkUpdate) checkUpdate();
|
||||
client.session_id = data.session_id;
|
||||
if (client.user) {
|
||||
client.user._patch(data.user);
|
||||
|
@@ -128,6 +128,7 @@ class Options extends null {
|
||||
scheduledEvent: 'https://discord.com/events',
|
||||
},
|
||||
jsonTransformer: (object) => JSONBig.stringify(object),
|
||||
checkUpdate: true,
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user