mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Update README instructions and example config, add some notes
This commit is contained in:
parent
bd7c41ab1f
commit
0dee588231
1 changed files with 43 additions and 23 deletions
66
README.md
66
README.md
|
@ -4,29 +4,39 @@ These instructions are intended for bot development only.
|
||||||
👉 **No support is offered for self-hosting the bot!** 👈
|
👉 **No support is offered for self-hosting the bot!** 👈
|
||||||
|
|
||||||
## Running the bot
|
## Running the bot
|
||||||
1. `npm ci`
|
1. `cd backend`
|
||||||
2. Make a copy of `bot.env.example` called `bot.env`, fill in the values
|
2. `npm ci`
|
||||||
3. Run the desired start script:
|
3. Make a copy of `bot.env.example` called `bot.env`, fill in the values
|
||||||
\- `npm run start-bot-dev` to run the bot with `ts-node`
|
4. Run the desired start script:
|
||||||
\- `npm run build` followed by `npm run start-bot-prod` to run the bot compiled
|
* `npm run start-bot-dev` to run the bot with `ts-node`
|
||||||
\- `npm run watch-bot` to run the bot with `ts-node` and restart on changes
|
* `npm run build` followed by `npm run start-bot-prod` to run the bot compiled
|
||||||
4. When testing, make sure you have your test server in the `allowed_guilds` table or the guild's config won't be loaded at all
|
* `npm run watch-bot` to run the bot with `ts-node` and restart on changes
|
||||||
|
5. When testing, make sure you have your test server in the `allowed_guilds` table or the guild's config won't be loaded at all
|
||||||
|
|
||||||
## Running the API server
|
## Running the API server
|
||||||
1. `npm ci`
|
1. `cd backend`
|
||||||
2. Make a copy of `api.env.example` called `api.env`, fill in the values
|
2. `npm ci`
|
||||||
3. Run the desired start script:
|
3. Make a copy of `api.env.example` called `api.env`, fill in the values
|
||||||
\- `npm run start-api-dev` to run the API server with `ts-node`
|
4. Run the desired start script:
|
||||||
\- `npm run build` followed by `npm run start-api-prod` to run the API server compiled
|
* `npm run start-api-dev` to run the API server with `ts-node`
|
||||||
\- `npm run watch-api` to run the API server with `ts-node` and restart on changes
|
* `npm run build` followed by `npm run start-api-prod` to run the API server compiled
|
||||||
|
* `npm run watch-api` to run the API server with `ts-node` and restart on changes
|
||||||
|
|
||||||
## Running the dashboard
|
## Running the dashboard
|
||||||
1. Navigate to `dashboard/`
|
1. `cd dashboard`
|
||||||
2. `npm ci`
|
2. `npm ci`
|
||||||
3. Make a copy of `.env.example` called `.env`, fill in the values
|
3. Make a copy of `.env.example` called `.env`, fill in the values
|
||||||
4. Run the desired start script:
|
4. Run the desired start script:
|
||||||
\- `npm run build` compiled the dashboard's static files in `dist/` which can then be served with any web server
|
* `npm run build` compiled the dashboard's static files in `dist/` which can then be served with any web server
|
||||||
\- `npm run watch` runs Parcel.js's dev server that automatically reloads on changes
|
* `npm run watch` runs Parcel.js's dev server that automatically reloads on changes
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
* Since we now use shared paths in `tsconfig.json`, the compiled files in `backend/dist/` have longer paths, e.g.
|
||||||
|
`backend/dist/backend/src/index.js` instead of `backend/dist/index.js`. This is because the compiled shared files
|
||||||
|
are placed in `backend/dist/shared`.
|
||||||
|
* The `backend/register-tsconfig-prod-paths.js` module takes care of registering shared paths from `tsconfig.json` for
|
||||||
|
`ts-node`, `ava`, and compiled `.js` files
|
||||||
|
* To run the tests for the files in the `shared/` directory, you also need to run `npm ci` there
|
||||||
|
|
||||||
## Config format example
|
## Config format example
|
||||||
Configuration is stored in the database in the `configs` table
|
Configuration is stored in the database in the `configs` table
|
||||||
|
@ -49,14 +59,24 @@ plugins:
|
||||||
- level: '>=100'
|
- level: '>=100'
|
||||||
config:
|
config:
|
||||||
kick_message: 'You have been kicked by an admin'
|
kick_message: 'You have been kicked by an admin'
|
||||||
spam:
|
|
||||||
|
other_plugin:
|
||||||
config:
|
config:
|
||||||
filter_words: ['heck']
|
categories:
|
||||||
|
mycategory:
|
||||||
|
opt: "something"
|
||||||
|
othercategory:
|
||||||
|
enabled: false
|
||||||
|
opt: "hello"
|
||||||
overrides:
|
overrides:
|
||||||
- channel: '1234'
|
|
||||||
config:
|
|
||||||
+filter_words: ['foo']
|
|
||||||
- level: '>=50'
|
- level: '>=50'
|
||||||
config:
|
config:
|
||||||
-filter_words: ['heck']
|
categories:
|
||||||
|
mycategory:
|
||||||
|
enabled: false
|
||||||
|
- channel: '1234'
|
||||||
|
config:
|
||||||
|
categories:
|
||||||
|
othercategory:
|
||||||
|
enabled: true
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue