forked from d-zone-org/d-zone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiscord-config.js
68 lines (64 loc) · 2.36 KB
/
discord-config.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
const convict = require('convict');
const path = require('path');
// Define a schema
const config = convict({
url: {
doc: 'The site URL where the simulation can be viewed.',
format: String,
default: ''
},
infoCommand: {
doc: 'The command which the bot will respond to with the site URL.',
format: String,
default: '!d-zone'
},
servers: [
{
id: {
doc: 'The Discord server ID you want to simulate.',
format: String,
default: '123456789'
},
default: {
doc: 'Indicates whether clients connect to this server by default. One server should have this set to true.',
format: Boolean,
default: false
},
alias: {
doc: 'Optional, server selection box will show this instead of the actual server name.',
format: String,
default: ''
},
password: {
doc: 'Optional, clients will be required to enter this password to connect to this server.',
format: String,
default: ''
},
ignoreChannels: {
doc: 'Optional, list of text channel names or IDs you want to be ignored (cannot be used with listenChannels, case-sensitive).',
format: Array,
default: []
},
ignoreUsers: {
doc: 'Optional, list of user IDs you want to be ignored (user ID means the long string of numbers, not username@1234).',
format: Array,
default: []
},
listenChannels: {
doc: 'Optional, list of text channel names or IDs you do not want to ignore (cannot be used with ignoreChannels, case-sensitive).',
format: Array,
default: []
},
hideOffline: {
doc: 'Hides all offline users. This instantly removes users when they go offline, and creates them when they come online. Recommended for larger servers.',
format: Boolean,
default: false
}
}
]
});
// Load configuration
config.loadFile(path.resolve(__dirname, 'discord-config.json'));
// Perform validation
config.validate();
module.exports = config;