Clear console.log, checkUpdate in ClientOptions
This commit is contained in:
parent
ec9428f9c2
commit
bb3d582f61
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord.js-selfbot-v13",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
|
||||
"main": "./src/index.js",
|
||||
"types": "./typings/index.d.ts",
|
||||
@ -45,6 +45,7 @@
|
||||
"@sapphire/snowflake": "^3.2.0",
|
||||
"@types/ws": "^8.5.2",
|
||||
"axios": "^0.26.1",
|
||||
"chalk": "^4.1.2",
|
||||
"discord-api-types": "^0.27.3",
|
||||
"discord.js": "^13.6.0",
|
||||
"form-data": "^4.0.0",
|
||||
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user