Skip to content

Commit

Permalink
Updated readme, added slurs, added placeholder badWords.json to preve…
Browse files Browse the repository at this point in the history
…nt errors
  • Loading branch information
Bogdan Corbean committed Feb 6, 2022
1 parent 3c19ccd commit 4ad6752
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dist
cache/*
libs/*
src/cache/*
badWords.json
shaii.json
config.shaii.json
!prisma/migrations
Expand Down
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,35 @@ export default definePlugin({

## 🗃 Installation

1. Get a discord bot token
2. Install bloatware
1. Make a new bot through the developer portal so that you have a token for use in `config.shaii.json`
2. Fork, clone repo & cd into the folder Shaii

Next, depending on your platform:
### Linux

1. Install dependencies

```
sudo apt install -y build-essential g++-10 libxi-dev libxext-dev libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev libjpeg-dev librsvg2-dev mesa-common-dev
```
2. *TODO: set up mongo on linux*
3. Use node.js 16.6.0 `nvm install 16.6.0 && nvm use 16.6.0`
4. Configure your `config.shaii.json` in `src`
5. `CXX=10 npm ci` to install dependencies
6. `npm run dev` to run the bot
4. `CXX=10 npm ci` to install dependencies

### Windows

1. Install Node versoin 16.x.x
2. Install MongoDB Community https://www.mongodb.com/try/download/community & follow default installation
3. npm i

Once all these are set up:

1. Make `config.shaii.json` in `src` following `example.config.shaii.json`
Set path to a music folder (make an empty one in the repo folder if you don't care)
Set the token
Set the chat log ID
Set url to mongodb (mongodb://127.0.0.1:27017 if hosting locally)
2. In `constants/index.ts` replace guild & channel IDs with those of your test guild
3. `npm run dev`

GG
4 changes: 4 additions & 0 deletions src/assets/badWords.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"placeholderword1",
"placeholderword2"
]
2 changes: 2 additions & 0 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export const SLURS = [
"bobbyfucker",
"neanderthal",
"python dev",
"developerl",
"soydev",
];

export const IPV4_REGEX = /((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/g;
Expand Down

0 comments on commit 4ad6752

Please sign in to comment.