forked from Jarvis1337/XversE-Adv-Handler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
38 lines (32 loc) · 1.23 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
const { Client, Collection, Intents } = require("discord.js");
const fs = require("fs");
const config = require("./settings/config.js");
const client = new Client({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES],
partials: ["GUILD", "GUILD_MEMBER", "CHANNEL", "MESSAGE", "USER"],
allowedMentions: {
parse: ['everyone', 'users', 'roles'],
repliedUser: false,
},
});
module.exports = client;
// <!-- Global Variables -->
client.events = new Collection()
client.commands = new Collection()
client.slashCommands = new Collection()
client.aliases = new Collection()
client.MsgCategories = fs.readdirSync('./Commands/Message')
client.SlashCategories = fs.readdirSync('./Commands/Slash')
client.temp = new Collection()
client.config = require('./settings/config')
// <!-- Event Handler -->
client.on("ready", () => {
client.user.setStatus("dnd");
client.user.setActivity("XversE-Adv-Handler", { type: "WATCHING" });
console.log(`[>] 🚀 | ${client.user.username} is Ready to use!`);
client.channels.fetch(config.XversE.logChannelID).then((log) => {
log.send(`\`\`\`xml\n🚀 I'm ready to use!\n🟢 Version :: ${config.XversE.version}\`\`\``);
});
});;
require('./handlers/handler')(client)
client.login(config.TOKEN);