-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.js
21 lines (20 loc) · 1 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require("module-alias/register");
// ———————————————[Client Requirement]———————————————
const { Client, Discord, Intents, Collection } = require("discord.js");
const client = new Client({ intents: 32767 });
const { I18n } = require("locale-parser");
const config = require("@config");
// ———————————————[Client Export]———————————————
module.exports = client;
client.commands = new Collection();
client.utils = require("@utils");
client.i18n = new I18n(config.client.language);
// Structure Intialization
["commands", "events"].forEach((file) => {
require(`@structures/${file}`)(client);
});
// Database Intialization
client.database = require("./src/database/main");
require("./src/database/main");
// ———————————————[Client Login]———————————————
client.login(config.client.devMode.enabled ? config.client.devMode.token : config.client.token);