This repository was archived by the owner on Nov 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathchill.js
More file actions
35 lines (35 loc) · 1.09 KB
/
Copy pathchill.js
File metadata and controls
35 lines (35 loc) · 1.09 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
35
const { Collection, Client, GatewayIntentBits, Partials } = require(`discord.js`);
const client = new Client({
intents: [
GatewayIntentBits.MessageContent,
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildBans,
GatewayIntentBits.GuildEmojisAndStickers,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.GuildWebhooks,
],
partials: [
Partials.Message,
Partials.Reaction,
Partials.Channel,
],
});
client.serverstatscooldown = new Set();
client.queue = new Map();
client.slashs = new Collection();
client.commands = new Collection();
client.aliases = new Collection();
// load modules
client.chill = require(`./handlers/module.js`);
client.chill.setupDatabases(client);
client.lang = require(`./handlers/language.js`);
// load handlers
[`command`, `event`, `errors`].forEach(handler => {
require(`./handlers/${handler}`)(client);
});
client.login(require(`./config.json`).token);