forked from SAIOPXD696969/Ares
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
60 lines (44 loc) · 1.83 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
const { Client, Collection, MessageEmbed, MessageButton, MessageActionRow, WebhookClient, Intents } = require("discord.js");
const client = new Client({ intents: 32767 });
const wait = require('wait');
const { Database } = require('quickmongo');
const settings = require('./core/settings');
const web = new WebhookClient({ url: 'https://discord.com/api/webhooks/1028007636156813353/cxqw0Iy2aV4-XbWHA8WG41w5Ez6y_TWjCvvTZFvakI1-GDUkG6sFZ-kmNgyx7p54Q6Pr' });
const phin = require('phin').unpromisified;
const chalk = require('chalk');
const { readdirSync } = require("fs");
const util = require('./handler/util.js');
const GiveawayManager = require("./handler/GiveawayManager");
const config = require("./config");
const data = require("./config");
client.emoji = {
'tick': '<:CyanTick:1027951432151879720>',
'cross': '<:vbVoteCrossCyan:1027966735153905724>',
'dot': '<a:c_dot4:1026889119667847249>',
'giveaway': '<a:giveaway2:1027531088135991337>'
};
const db = new Database('mongodb+srv://Test_Bot:[email protected]/?retryWrites=true&w=majority');
db.connect();
require(`./core/db.js`)
client.giveawaysManager = new GiveawayManager(client);
client.commands = new Collection();
client.slashCommands = new Collection();
client.categories = readdirSync("./commands/");
client.util = new util(client);
client.db = db;
client.color = '00e3ff';
require("./database/connect")();
readdirSync("./events/").forEach(file => {
let eventName = file.split(".")[0];
require(`./events/${file}`)(client);
console.log(`[ EVENTS ] Client event named ${eventName} loaded`);
});
require("./handler")(client);
client.login(data.token);
module.exports = client;
process.on('unhandledRejection',async(err) => {
console.error(err);
});
process.on('uncaughtException',async(er) => {
console.error(er)
});