From 885d4ec3ccd5732d3e8b0e0c4e6481e2196140f1 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Tue, 27 Jun 2023 19:01:39 +0500 Subject: [PATCH] some ready event changes --- events/ready.js | 16 ++++++++-------- index.js | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/events/ready.js b/events/ready.js index 9d351a9c..d9f00bba 100644 --- a/events/ready.js +++ b/events/ready.js @@ -23,23 +23,23 @@ class Ready extends BaseEvent { }); tUsers = tUsers - hiddenGuildMembersCount; - client.logger.log(`Loaded a total of ${commands.length} command(s).`, "ready"); - client.logger.log(`${client.user.discriminator === "0" ? client.user.username : client.user.tag}, ready to serve ${tUsers} members in ${tServers} servers.`, "ready"); - client.logger.log(`Invite Link: ${client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [ PermissionsBitField.Flags.Administrator ] })}`, "ready"); - console.timeEnd("botReady"); - const birthdays = require("../helpers/birthdays"); birthdays.init(client); - const checkReminds = require("../helpers/checkReminds"); checkReminds.init(client); - if (client.config.dashboard.enabled) client.dashboard.load(client); + if (client.config.dashboard.enabled) await client.dashboard.load(client); + + client.logger.log(`Loaded a total of ${commands.length} command(s).`, "ready"); + client.logger.log(`${client.user.discriminator === "0" ? client.user.username : client.user.tag}, ready to serve ${tUsers} members in ${tServers} servers.`, "ready"); + client.logger.log(`Invite Link: ${client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [ PermissionsBitField.Flags.Administrator ] })}`, "ready"); + + console.timeEnd("botReady"); const version = require("../package.json").version; const status = [ - { name: "help", type: ActivityType.Watching }, + { name: "/help", type: ActivityType.Watching }, { name: `${commands.length} ${client.functions.getNoun(commands.length, client.translate("misc:NOUNS:COMMANDS:1"), client.translate("misc:NOUNS:COMMANDS:2"), client.translate("misc:NOUNS:COMMANDS:5"))}`, type: ActivityType.Listening }, { name: `${tServers} ${client.functions.getNoun(tServers, client.translate("misc:NOUNS:SERVER:1"), client.translate("misc:NOUNS:SERVER:2"), client.translate("misc:NOUNS:SERVER:5"))}`, type: ActivityType.Watching }, { name: `${tUsers} ${client.functions.getNoun(tUsers, client.translate("misc:NOUNS:USERS:1"), client.translate("misc:NOUNS:USERS:2"), client.translate("misc:NOUNS:USERS:5"))}`, type: ActivityType.Watching }, diff --git a/index.js b/index.js index 7b932513..3e60656d 100644 --- a/index.js +++ b/index.js @@ -9,12 +9,13 @@ const client = new JaBa({ }); (async () => { + console.time("botReady"); + client.translations = await require("./helpers/languages")(); await client.loadEvents("../events"); await client.loadCommands("../commands"); await client.init(); - console.time("botReady"); })(); client.on("disconnect", () => client.logger.log("Bot is disconnecting...", "warn"))