diff --git a/src/index.js b/src/index.js index 3429d899..48d43465 100644 --- a/src/index.js +++ b/src/index.js @@ -1,11 +1,6 @@ -// import "./helpers/extenders.js"; - -// import { GatewayIntentBits } from "discord.js"; -// import JaBaClient from "./base/Client.js"; -// import languages from "./helpers/languages.js"; - import { GatewayIntentBits } from "discord.js"; import { ExtendedClient } from "./structures/client.js"; +import logger from "./helpers/logger.js"; export const client = new ExtendedClient({ intents: [ @@ -30,41 +25,10 @@ export const client = new ExtendedClient({ client.init(); -// const client = new JaBaClient({ -// intents: [ -// GatewayIntentBits.Guilds, -// GatewayIntentBits.GuildMembers, -// GatewayIntentBits.GuildModeration, -// GatewayIntentBits.GuildEmojisAndStickers, -// GatewayIntentBits.GuildIntegrations, -// GatewayIntentBits.GuildInvites, -// GatewayIntentBits.GuildVoiceStates, -// GatewayIntentBits.GuildPresences, -// GatewayIntentBits.GuildMessages, -// GatewayIntentBits.GuildMessageReactions, -// GatewayIntentBits.GuildMessageTyping, -// GatewayIntentBits.MessageContent, -// GatewayIntentBits.DirectMessageTyping, -// GatewayIntentBits.DirectMessages, -// GatewayIntentBits.DirectMessageReactions, -// ], -// allowedMentions: { parse: ["everyone", "roles", "users"] }, -// }); +client + .on("disconnect", () => logger.warn("Bot disconnected.")) + .on("reconnecting", () => logger.warn("Bot reconnecting...")) + .on("warn", console.log) + .on("error", console.log); -// (async () => { -// console.time("botReady"); - -// client.translations = await languages(); - -// await client.loadEvents("../events"); -// await client.loadCommands("../commands"); -// await client.init(); -// })(); - -// client -// .on("disconnect", () => client.logger.warn("Bot disconnected.")) -// .on("reconnecting", () => client.logger.warn("Bot reconnecting...")) -// .on("warn", console.log) -// .on("error", console.log); - -// process.on("unhandledRejection", e => console.log(e)).on("uncaughtException", e => console.log(e)); +process.on("unhandledRejection", console.log).on("uncaughtException", console.log); diff --git a/src/services/languages/index.js b/src/services/languages/index.js index e09397ee..a2cd78b9 100644 --- a/src/services/languages/index.js +++ b/src/services/languages/index.js @@ -51,7 +51,7 @@ export default class InternationalizationService { backend: { loadPath: resolve(this.options.localesPath, "./{{lng}}/{{ns}}.json"), }, - debug: this.client.configService.get("production") ? true : false, + debug: this.client.configService.get("production") ? false : true, fallbackLng: this.options.defaultLanguage, preload: languages, ns: namespaces,