Repository navigation
Expand file tree
/
Copy pathindex.js
More file actions
71 lines (63 loc) · 1.68 KB
/
Copy pathindex.js
File metadata and controls
71 lines (63 loc) · 1.68 KB
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
require('dotenv').config()
const {
Collection,
Client
} = require('discord.js');
const path = require('path');
const fs = require('fs');
const {
DiscordTogether
} = require('discord-together');
// Defining my Client
const client = new Client({
allowedMentions: {
repliedUser: false,
parse: ['users']
},
intents: 32511,
// Mobile Status
// ws: {
// properties: {
// $browser: "Discord Android"
// }
// }
});
module.exports = client;
// Currency System Configuration
const CurrencySystem = require("currency-system");
const cs = new CurrencySystem;
cs.setMongoURL(process.env.MONGO_STRING, false);
cs.setDefaultWalletAmount('100');
cs.setDefaultBankAmount('200');
cs.setDefaultBankLimitForUser(1000);
// Giveaway System Configuration
const {
GiveawaysManager
} = require('discord-giveaways');
const manager = new GiveawaysManager(client, {
storage: './json/giveaways.json',
default: {
botsCanWin: false,
embedColor: 'BLUE',
embedColorEnd: 'RED',
reaction: '🎉',
lastChance: {
enabled: true,
content: '⚠️ **LAST CHANCE TO ENTER !** ⚠️',
threshold: 5000,
embedColor: '#FF0000'
}
}
});
// Global variables
client.commands = new Collection();
client.prefix = process.env.PREFIX;
client.slashCommands = new Collection();
client.aliases = new Collection();
client.categories = fs.readdirSync(path.resolve('commands'));
client.discordTogether = new DiscordTogether(client);
client.giveawaysManager = manager;
// Requiring the Handler
require('./handler')(client);
// Logging into the client
client.login(process.env.TOKEN);