From a14b5fe278dc8caca58be688e650ff5e7ce7039a Mon Sep 17 00:00:00 2001 From: PineappleFan Date: Sat, 30 Jul 2022 22:02:24 +0100 Subject: [PATCH] Update format.js --- src/config/format.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/config/format.js b/src/config/format.js index f87c9f7..ed7eba1 100644 --- a/src/config/format.js +++ b/src/config/format.js @@ -3,15 +3,15 @@ import * as readLine from 'node:readline/promises'; import { exec } from 'node:child_process'; const defaultDict = { - "token": "Your bot token", - "developmentToken": "Your development bot token", - "managementGuildID": "Your management guild ID", + "developmentToken": "Your development bot token (Used for testing in one server, rather than production)", "developmentGuildID": "Your development guild ID", "enableDevelopment": true, + "token": "Your bot token", + "managementGuildID": "Your management guild ID (Used for running management commands on the bot)", "owners": [], - "verifySecret": "If using verify, enter a code here which matches your website if needed", + "verifySecret": "If using verify, enter a code here which matches your website. You can use a random code if you do not have one already. (Optional)", "mongoUrl": "Your Mongo connection string, e.g. mongodb://127.0.0.1:27017", - "baseUrl": "Your website where buttons such as Verify will link to, e.g. https://example.com", + "baseUrl": "Your website where buttons such as Verify and Role menu will link to, e.g. https://example.com", "pastebinApiKey": "An API key for pastebin (optional)", "pastebinUsername": "Your pastebin username (optional)", "pastebinPassword": "Your pastebin password (optional)", @@ -78,6 +78,7 @@ export default async function(walkthrough = false) { else { json[key] = defaultDict[key] } } } + if (walkthrough && !json.mongoUrl) json.mongoUrl = "mongodb://127.0.0.1:27017" if (!json.mongoUrl.endsWith("/")) json.mongoUrl += "/"; if (!json.baseUrl.endsWith("/")) json.baseUrl += "/"; let hosts = fs.readFileSync('/etc/hosts', 'utf8').toString().split("\n");