JaBa/index.js

23 lines
1.2 KiB
JavaScript
Raw Normal View History

2022-01-04 02:18:28 +05:00
require("./helpers/extenders");
const { GatewayIntentBits } = 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: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildBans, GatewayIntentBits.GuildEmojisAndStickers, GatewayIntentBits.GuildIntegrations, GatewayIntentBits.GuildInvites, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildMessageTyping, GatewayIntentBits.MessageContent ],
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");
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...", "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"));
process.on("unhandledRejection", e => client.logger.log(e, "error"));