2022-01-04 02:18:28 +05:00
|
|
|
require("./helpers/extenders");
|
|
|
|
|
2022-07-31 17:08:00 +05:00
|
|
|
const { GatewayIntentBits } = require("discord.js"),
|
2022-07-23 17:14:42 +05:00
|
|
|
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-10-11 15:16:51 +05:00
|
|
|
intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildBans, GatewayIntentBits.GuildEmojisAndStickers, GatewayIntentBits.GuildIntegrations, GatewayIntentBits.GuildInvites, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildMessageTyping, GatewayIntentBits.MessageContent, GatewayIntentBits.DirectMessageTyping, GatewayIntentBits.DirectMessages, GatewayIntentBits.DirectMessageReactions ],
|
2022-12-15 21:02:38 +05:00
|
|
|
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 () => {
|
2023-06-27 19:01:39 +05:00
|
|
|
console.time("botReady");
|
|
|
|
|
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"))
|
2022-07-31 17:08:00 +05:00
|
|
|
.on("reconnecting", () => client.logger.log("Bot reconnecting...", "warn"))
|
2022-08-09 23:48:33 +05:00
|
|
|
.on("warn", warn => client.logger.log(warn, "warn"))
|
|
|
|
.on("error", e => client.logger.log(`${e.message}\n${e.stack}`, "error"));
|
2023-06-27 00:49:32 +05:00
|
|
|
process.on("unhandledRejection", e => console.log(e));
|
|
|
|
process.on("uncaughtException", e => console.log(e));
|