2022-01-04 02:18:28 +05:00
|
|
|
require("./helpers/extenders");
|
|
|
|
|
2022-07-23 17:14:42 +05:00
|
|
|
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({
|
2022-07-23 17:14:42 +05:00
|
|
|
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
|
|
|
|
2022-07-23 17:14:42 +05:00
|
|
|
(async () => {
|
2022-07-26 17:20:10 +05:00
|
|
|
client.translations = await require("./helpers/languages")();
|
|
|
|
|
2022-07-23 17:14:42 +05:00
|
|
|
await client.loadEvents("../events");
|
2022-07-26 19:46:32 +05:00
|
|
|
await client.loadCommands("../commands");
|
2022-07-23 17:14:42 +05:00
|
|
|
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));
|