Merge branch 'development' of github.com:clicksminuteper/nucleus into development

pull/6/head
pineafan 3 years ago
commit 9106564cf8
No known key found for this signature in database
GPG Key ID: 0AEF25BAA0FB1C74

@ -73,4 +73,4 @@ You should always know what we know and store about you, so here is the complete
### Self hosting ### Self hosting
Nucleus is fully open source, and you can run your own copy. Read [COPYING.md](https://github.com/ClicksMinutePer/Nucleus/blob/development/COPYING.md) for the legal requirements and a guide for how to configure your own copy. Nucleus is fully open source, and you can run your own copy. Read [SELF_HOSTING.md](https://github.com/ClicksMinutePer/Nucleus/blob/development/SELF_HOSTING.md) for the legal requirements and a guide for how to configure your own copy.

@ -25,6 +25,7 @@ However, you **must**:
## How to: ## How to:
We hide the config file with our important data like the bot token. Below you can find a copy of `src/config/main.json`. We hide the config file with our important data like the bot token. Below you can find a copy of `src/config/main.json`.
Alternatively, you can run `Installer.js` to generate it for you.
```json ```json
{ {
@ -40,6 +41,8 @@ We hide the config file with our important data like the bot token. Below you ca
"mongoUrl": "mongodb://your-mongo-ip-and-port", "mongoUrl": "mongodb://your-mongo-ip-and-port",
"baseUrl": "your website url, e.g. https://clicks.codes", "baseUrl": "your website url, e.g. https://clicks.codes",
"pastebinApiKey": "your-pastebin-api-key" "pastebinApiKey": "your-pastebin-api-key"
"pastebinUsername": "your-pastebin-username"
"pastebinPassword": "your-pastebin-password"
} }
``` ```

@ -3,15 +3,15 @@ import * as readLine from 'node:readline/promises';
import { exec } from 'node:child_process'; import { exec } from 'node:child_process';
const defaultDict = { const defaultDict = {
"token": "Your bot token", "developmentToken": "Your development bot token (Used for testing in one server, rather than production)",
"developmentToken": "Your development bot token",
"managementGuildID": "Your management guild ID",
"developmentGuildID": "Your development guild ID", "developmentGuildID": "Your development guild ID",
"enableDevelopment": true, "enableDevelopment": true,
"token": "Your bot token",
"managementGuildID": "Your management guild ID (Used for running management commands on the bot)",
"owners": [], "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 the secret sent back by 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", "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)", "pastebinApiKey": "An API key for pastebin (optional)",
"pastebinUsername": "Your pastebin username (optional)", "pastebinUsername": "Your pastebin username (optional)",
"pastebinPassword": "Your pastebin password (optional)", "pastebinPassword": "Your pastebin password (optional)",
@ -78,6 +78,7 @@ export default async function(walkthrough = false) {
else { json[key] = defaultDict[key] } 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.mongoUrl.endsWith("/")) json.mongoUrl += "/";
if (!json.baseUrl.endsWith("/")) json.baseUrl += "/"; if (!json.baseUrl.endsWith("/")) json.baseUrl += "/";
let hosts; let hosts;

Loading…
Cancel
Save