generated from Milrato-Development/Easiest-Application
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
106 lines (100 loc) · 2.77 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//import the Discord Library
const Discord = require("discord.js");
//import the config.json file
const config = require("./config.json")
//create a new Client
const client = new Discord.Client({
fetchAllMembers: false,
restTimeOffset: 0,
shards: "auto",
restWsBridgetimeout: 100,
disableEveryone: true,
partials: ['MESSAGE', 'CHANNEL', 'REACTION'],
presence: {
afk: false,
activity: {
name: `${config.prefix}help | ${config.prefix}setup`,
type: "WATCHING",
},
status: "idle"
}
});
//import our databasing system
const Enmap = require("enmap");
//create all 3 different databases for each application system
client.apply = new Enmap({
name: "apply",
dataDir: "./dbs/apply"
})
client.apply2 = new Enmap({
name: "apply2",
dataDir: "./dbs/apply2"
})
client.apply3 = new Enmap({
name: "apply3",
dataDir: "./dbs/apply3"
})
client.apply4 = new Enmap({
name: "apply4",
dataDir: "./dbs/apply4"
})
client.apply5 = new Enmap({
name: "apply5",
dataDir: "./dbs/apply5"
})
client.apply6 = new Enmap({
name: "apply6",
dataDir: "./dbs/apply6"
})
client.apply7 = new Enmap({
name: "apply7",
dataDir: "./dbs/apply7"
})
client.apply8 = new Enmap({
name: "apply8",
dataDir: "./dbs/apply8"
})
client.apply9 = new Enmap({
name: "apply9",
dataDir: "./dbs/apply9"
})
client.apply10 = new Enmap({
name: "apply10",
dataDir: "./dbs/apply10"
})
//LOAD EACH MODULE FOR CMDS AND APPLIES
require(`./modules/cmds`)(client);
require(`./modules/apply`)(client);
require(`./modules/apply2`)(client);
require(`./modules/apply3`)(client);
require(`./modules/apply4`)(client);
require(`./modules/apply5`)(client);
//login to the BOT
client.login(config.token);
/**
* @INFO
* Bot Coded by Tomato#6966 | https://github.com/Tomato6966/discord-js-lavalink-Music-Bot-erela-js
* @INFO
* Work for Milrato Development | https://milrato.eu
* @INFO
* Please mention Him / Milrato Development, when using this Code!
* @INFO
*/
process.on('unhandledRejection', (reason, p) => {
console.log('=== unhandled Rejection === ignore that log'.toUpperCase());
});
process.on("uncaughtException", (err, origin) => {
console.log('=== uncaught Exception === ignore that log'.toUpperCase());
})
process.on('uncaughtExceptionMonitor', (err, origin) => {
console.log('=== uncaught Exception Monitor === ignore that log'.toUpperCase());;
});
process.on('beforeExit', (code) => {
console.log('=== before Exit === ignore that log'.toUpperCase());
});
process.on('exit', (code) => {
console.log('=== exit === ignore that log'.toUpperCase());
});
process.on('multipleResolves', (type, promise, reason) => {
console.log('=== multiple Resolves === ignore that log'.toUpperCase());
});