-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateConfig.js
More file actions
29 lines (29 loc) · 787 Bytes
/
createConfig.js
File metadata and controls
29 lines (29 loc) · 787 Bytes
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
const fs = require("fs");
const rpc = require("./discord.js");
const defaultConfig = {
id: "1284349652195348482",
activity: {
details: "Node RPC by: Pancake",
state: "Idle",
large_image_key: "https://i.imgur.com/dOeIe6i.png",
large_image_text: "PanPan by: Pancake",
small_image_key: "https://i.imgur.com/BqsiWlo.png",
small_image_text: "node icon",
start_time_stamp: "elapsed",
twelve_hour_time: true,
state_and_time: true,
end_time_stamp: "",
},
};
if (!fs.existsSync("config.json")) {
fs.writeFile("config.json", JSON.stringify(defaultConfig), (err) => {
if (err) console.log(err);
else {
console.log("created config");
rpc.rpcStart();
}
});
} else {
console.log("config already exists");
rpc.rpcStart();
}