update README.md and .gitignore

This commit is contained in:
SowinskiBraeden committed 2024-11-07 15:42:05 -08:00
1 parent 5ddd430cbc
commit c6563ca2cd
3 files changed
+24 -36

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
# MongoDB connection URI as set in police-cad .env
dbo=knoldus
mongoURI=mongodb://localhost/knoldus
# Discord Bot Token
token=
+3 -12
View File
@@ -1,17 +1,8 @@
# dependencies # dependencies
node_modules/* node_modules/*
# test file # logs
default.js
test.js
default.js
# Dev
config/dev-config.js
dev.js
# Logs
logs/* logs/*
Logs.log
.env # environment variables
.env
+15 -24
View File
@@ -1,32 +1,23 @@
### Lines Police CAD Discord Bot ### Lines Police CAD Discord Bot
![lines police cad logo](https://github.com/Linesmerrill/police-cad/blob/master/lines-police-cad.png) ![lines police cad logo](https://github.com/Linesmerrill/police-cad/blob/master/lines-police-cad.png)
This is the official Lines Police CAD bot for discord integration. It allows you to use Lines Police CAD website features right in your discord channel! This is the official Lines Police CAD bot for Discord integration.
### Requirements : ### Requirements :
1. [Node.js](https://nodejs.org/en/) 1. [police-cad](https://github.com/LinesMerrill/police-cad)
1. [MongoDB](https://docs.mongodb.com/manual/administration/install-community/) 2. [Node.js](https://nodejs.org/en/)
3. [MongoDB](https://docs.mongodb.com/manual/administration/install-community/)
### Getting Started with Code : ### Getting Started with Code :
1. [Set Up MongoDB](#setting-up-mongodb) and start mongodb 1. Follow the [README.md](https://github.com/Linesmerrill/police-cad/blob/main/README.md) to setup an instance of the police-cad project. This will also include the setup of MongoDB that the bot will access.
2. Clone repo from https://github.com/SowinskiBraeden/LPC-Bot.git 2. Clone the repository and change into project directory.
```
$ git clone https://github.com/SowinskiBraeden/police-cad-bot.git && cd police-cad-bot
```
3. Run `npm install` to install dependencies. 3. Run `npm install` to install dependencies.
4. Edit the `index.js` file to have the your correct parameters to run the bot. 4. Duplicate `.env.example` and rename to `.env`. Edit to your configurations
The parameters are as follows: 5. Run the bot using node.
1. Version ```
2. Bot Token $ node index.js
3. path to config ```
4. mongoURI
5. mongoDBO
1. Run `npm start` to run the `index.js` file and start the bot.
1. The bot is now ready to use.
### Setting up MongoDB
1. Install mongodb via brew [Step by step instructions](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/)
1. Start mongodb via brew [Step by step instructions](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/#run-mongodb-community-edition)
### Accessing the Database
1. Locally this will use the knoldus db (or whatever you specify manually)
1. launch mongo via your command-line: `mongo`
1. Use `show dbs` to see all that are available. You should see `knoldus` in the list.
1. Lets use that db: `use knoldus`.