JaBa/index.js

23 lines
825 B
JavaScript
Raw Normal View History

2022-01-04 02:18:28 +05:00
require("./helpers/extenders");
const { Intents } = require("discord.js"),
JaBa = require("./base/JaBa");
2022-01-04 02:18:28 +05:00
2022-01-03 23:20:33 +05:00
const client = new JaBa({
intents: Object.keys(Intents.FLAGS),
allowedMentions: { parse: ["everyone", "roles", "users"] }
2022-01-03 23:20:33 +05:00
});
2022-01-04 02:18:28 +05:00
(async () => {
client.translations = await require("./helpers/languages")();
await client.loadEvents("../events");
await client.loadCommands("../commands", client.config.support.production ? "" : client.config.support.id);
await client.init();
})();
2022-01-04 02:18:28 +05:00
client.on("disconnect", () => client.logger.log("Bot is disconnecting...", "warn"))
.on("reconnecting", () => client.logger.log("Bot reconnecting...", "log"))
.on("error", (e) => client.logger.log(e, "error"))
.on("warn", (info) => client.logger.log(info, "warn"));
process.on("unhandledRejection", (err) => console.error(err));