-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
41 lines (32 loc) · 1.16 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
40
41
const { Client, Collection, EmbedBuilder } = require("discord.js");
const client = new Client({ intents: 3276799 });
const {QuickDB} = require("quick.db");
const db = new QuickDB();
module.exports = db;
client.commands = new Collection();
client.config = require('./config').clients;
client.footer = "Karmakekette";
client.snipeMap = new Collection();
(async () => {
client.prefix = await db.get("prefix") || "+";
client.color = await db.get("color") || "#0037ff";
client.template = new EmbedBuilder().setColor(client.color);
})();
require('./src/Structure/Handler/Events')(client);
require('./src/Structure/Handler/Commands')(client);
client.login(client.config.token);
client.on("messageCreate", async (message) => {
if (message.content == ";emit memberJoin") {
const member = message.member;
client.emit("guildMemberAdd", member);
}
})
process.on('unhandledRejection', (reason, promise) => {
console.error(promise, reason);
});
process.on("uncaughtException", (err, origin) => {
console.error(err, origin);
});
process.on('uncaughtExceptionMonitor', (err, origin) => {
console.error(err, origin);
});