forked from omar00050/quran_radio
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
52 lines (43 loc) · 1.03 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
require("dotenv").config();
require("module-alias/register");
require("colors");
const { registerFont } = require('canvas');
const fontFile = './src/utils/fonts/Amiri-Regular.ttf';
registerFont(fontFile, { family: 'Amiri' });
require("events").EventEmitter.setMaxListeners(999999999)
const { GatewayIntentBits, Partials } = require("discord.js");
const Quran = require("@DevXor/DevXor");
let client = new Quran({
token: process.env.token,
database: {
database_type: "MONGODB",
MongoDB: {
uri: process.env.mongodb_uri
},
options: {
nested: '..',
nestedIsEnabled: true,
cache: {
isEnabled: true,
capacity: 2048
}
}
}
});
setTimeout(function () {
client.botlogin(process.env.token);
}, 2000);
module.exports = client;
//nodejs-events
process.on("unhandledRejection", e => {
if (!e) retrun;
console.log(e)
});
process.on("uncaughtException", e => {
if (!e) return;
console.log(e)
});
process.on("uncaughtExceptionMonitor", e => {
if (!e) return
console.log(e)
});