forked from appujet/lavalink-list
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
31 lines (26 loc) · 768 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
require("dotenv").config();
module.exports = {
token: process.env.TOKEN || "", // your bot token
logs: process.env.LOGS || "", // channel id for lavalink server status logs
nodes: [
{
host: process.env.NODE_HOST || "",
identifier: process.env.NODE_ID || "",
port: parseInt(process.env.NODE_PORT || ""),
password: process.env.NODE_PASSWORD || "",
secure: parseBoolean(process.env.NODE_SECURE || "false"),
}
],
}
function parseBoolean(value) {
if (typeof (value) === 'string') {
value = value.trim().toLowerCase();
}
switch (value) {
case true:
case "true":
return true;
default:
return false;
}
}