diff options
author | TymanWasTaken <tyman@tyman.tech> | 2021-05-25 13:20:20 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 13:20:20 -0600 |
commit | 820d583eb753eb5ce725a8f080d3ec36b2b14c9b (patch) | |
tree | 98aa3a03847e4f6c07e29788a030566a24ef5551 | |
parent | 07ad1716f8b51edd16edb579b281f4a41858da6f (diff) | |
download | tanzanite-820d583eb753eb5ce725a8f080d3ec36b2b14c9b.tar.gz tanzanite-820d583eb753eb5ce725a8f080d3ec36b2b14c9b.tar.bz2 tanzanite-820d583eb753eb5ce725a8f080d3ec36b2b14c9b.zip |
Update SETUP.md
-rw-r--r-- | SETUP.md | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -1,16 +1,19 @@ # How to set up -## Pre requisites +1. Clone the bot (if you haven't already) +2. Run `yarn` to make sure dependencies are all set up +3. Copy `src/config/example-options.ts` to `src/config/options.ts` and change all the options to what you need -1. Git -2. A discord bot on the dev portal -3. NodeJS -4. Yarn (npm also works but I strongly encourage to use yarn instead) +### Database -## Main setup +1. Make sure to have a postgresql db running on something you can access (postgres supports all OSes) +2. Make sure you have a db with the correct name (for dev it is `bush-bot-dev`, for non-dev it is `bush-bot`) -1. Clone this repository -2. Install all dependencies with `yarn` -3. Set up config by creating `src/config/options.ts` (Use `src/config/example-options.ts` as a guide) and adding all the options -4. Optional: Make sure everything is set with `yarn test` -5. Start the bot with `yarn start` +Sequelize will handle tables for you, no need to do anything besides make the db + +### Start + +In production, use `yarn start` to start the bot. +In dev, use `yarn dev` to start the bot. + +The difference is the typescript compiler it uses. `yarn start` uses esbuild, which is speedy af but doesn't actually check code for errrors. `yarn dev` uses tsc which is slower but checks for errors. |