-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
36 lines (36 loc) · 954 Bytes
/
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
require('dotenv').config()
module.exports = {
debug: process.env.DEBUG?.toLowerCase() == 'true',
token: process.env.DISCORD_BOT_TOKEN,
clientId: process.env.DISCORD_CLIENT_ID,
leaveOnEnd: process.env.BOT_LEAVE_ON_QUEUE_END?.toLowerCase() != 'false',
leaveOnEndTimeout: (() => {
let timeout = 0
try {
timeout = parseInt(process.env.BOT_LEAVE_ON_QUEUE_END_TIMEOUT)
} catch {
timeout = 0
}
return timeout
})(),
leaveOnEmpty:
process.env.BOT_LEAVE_ON_EMPTY_CHANNEL?.toLowerCase() != 'false',
leaveOnEmptyTimeout: (() => {
let timeout = 0
try {
timeout = parseInt(process.env.BOT_LEAVE_ON_EMPTY_CHANNEL_TIMEOUT)
} catch {
timeout = 0
}
return timeout
})(),
initialVolume: (() => {
let initialVolume = 100
try {
initialVolume = parseInt(process.env.BOT_INITIAL_VOLUME)
} catch (error) {
initialVolume = 100
}
return initialVolume
})(),
}