generated from Wumpuspro/discord.js-v13-with-slash-command
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
39 lines (35 loc) · 1.1 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
const { Client, Message, MessageEmbed, Collection } = require("discord.js");
const colors = require("colors");
const fs = require("fs");
const client = new Client({
messageCacheLifetime: 60,
fetchAllMembers: false,
messageCacheMaxSize: 10,
restTimeOffset: 0,
restWsBridgetimeout: 100,
shards: "auto",
allowedMentions: {
parse: ["roles", "users", "everyone"],
repliedUser: true,
},
partials: ["MESSAGE", "CHANNEL", "REACTION"],
intents: 32767,
});
module.exports = client;
const config = require("./config/config.json");
const ee = require("./config/embed.json");
const prefix = config.prefix;
const token = config.token;
// Global Variables
client.commands = new Collection();
client.aliases = new Collection();
client.events = new Collection();
client.cooldowns = new Collection();
client.slashCommands = new Collection();
client.categories = fs.readdirSync("./commands/");
// Initializing the project
//Loading files, with the client variable like Command Handler, Event Handler, ...
["command"].forEach((handler) => {
require(`./handler/${handler}`)(client);
});
client.login(token);