mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-12-28 14:23:02 +05:00
refactor: fix i18n debug being true on production
This commit is contained in:
parent
62ab9250fc
commit
30a83aa273
2 changed files with 8 additions and 44 deletions
50
src/index.js
50
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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue