-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.js
More file actions
34 lines (29 loc) · 1.04 KB
/
Copy pathindex.js
File metadata and controls
34 lines (29 loc) · 1.04 KB
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
const { Client, Intents, Collection, Options, MessageEmbed, Partials } = require('discord.js');
require('colors')
require('dotenv').config();
const token = process.env.token
let client = new Client({
partials: ["CHANNEL"],
makeCache: Options.cacheWithLimits({
MessageManager: 200, // This is default
PresenceManager: 0,
InteractionManager: 200,
// Add more class names here
}),
intents: new Intents(32509),
allowedMentions: { parse: ['users', 'roles'], repliedUser: true }
})
module.exports = client;
const ascii = require("ascii-table");
let table = new ascii("HANDLERS");
table.setHeading("Trợ Năng", "Trạng Thái");
const fs = require('node:fs');
const path = require('node:path');
client.categories = fs.readdirSync(path.resolve('handlers'));
["commands", "events", "slashcommands", "functions"].forEach(handlers => {
table.addRow(handlers, `✅`);
require(path.resolve(`handlers/${handlers}`))(client);
});
console.log(table.toString().bold.brightGreen);
client.login(token);
//forever start nodemon ./index.js localhost 8080