-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
51 lines (42 loc) · 1.81 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const { Client, Partials, Collection } = require("discord.js");
const ms = require("ms");
const { promisify } = require("util");
const { glob } = require("glob");
const PG = promisify(glob);
const Ascii = require("ascii-table");
const config = require("./config.js");
const { I18n } = require("locale-parser");
const chalk = require("chalk");
const { Channel, GuildMember, Message, Reaction, ThreadMember, User, GuildScheduledEvent } = Partials;
const client = new Client({
intents: 131071,
partials: [Channel, GuildMember, Message, Reaction, ThreadMember, User, GuildScheduledEvent],
allowedMentions: { parse: ["everyone", "users", "roles"] },
rest: { timeout: ms("1m") },
});
client.commands = new Collection();
client.i18n = new I18n(config.LANGUAGE);
console.log(
chalk.cyan(`
###### ## ####### ## ## ######
## ## ## ## ## ### ### ## ##
## ## ## ## #### #### ##
###### ## ## ## ## ### ## ##
## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ##
###### ######## ####### ## ## ######
######## #### ###### ## ## ######## ######## ######
## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ##
## ## ## ##### ###### ## ######
## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ##
## #### ###### ## ## ######## ## ######
`),
);
const Handlers = ["Events", "Errors", "Commands"];
Handlers.forEach((handler) => {
require(`./Handlers/${handler}`)(client, PG, Ascii);
});
module.exports = client;
client.login(config.TOKEN);