-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
28 lines (24 loc) · 802 Bytes
/
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
const {
Client,
GatewayIntentBits,
Partials,
Collection,
ActivityType,
} = require("discord.js");
const { Guilds, GuildMembers, GuildMessages } = GatewayIntentBits;
const { User, Messages, GuildMember, ThreatMember } = Partials;
const client = new Client({
intents: [Guilds, GuildMembers, GuildMessages],
partials: [User, Messages, GuildMember, ThreatMember],
});
client.config = require("./config.json");
client.commands = new Collection();
client.subCommands = new Collection();
client.events = new Collection();
const { connect } = require("mongoose");
connect(client.config.DatabaseURL, {}).then(() =>
console.log("The clinet is now connected to the database")
);
const { loadEvents } = require("./Handlers/eventHandler");
loadEvents(client);
client.login(client.config.token);