2023-07-09 20:53:49 +00:00
|
|
|
## UA-Bot
|
|
|
|
|
|
|
|
**UA-Bot** - Bot for Mastodon that reboosts message if mentioned.
|
|
|
|
|
|
|
|
### Features
|
|
|
|
* Moderation - Send to Matrix room before reblog
|
|
|
|
* Reply or broken thread detection (not fully tested)
|
|
|
|
* Block instances and nicknames by regex
|
|
|
|
|
|
|
|
### Install
|
|
|
|
|
|
|
|
First, install Postgres.
|
|
|
|
|
|
|
|
Second, clone repo.
|
|
|
|
|
|
|
|
Copy `.env.example` to `.env` and edit with your data:
|
|
|
|
|
|
|
|
Also create `nicknames.txt` and `domains.txt` (regex files):
|
|
|
|
|
|
|
|
* `nicknames.txt` - block by username or display name
|
|
|
|
* `domains.txt` - block by domain name
|
|
|
|
|
|
|
|
Tip: `#` in the beginning of the regex file means that this line will be ignored. You can use it as comment
|
|
|
|
|
|
|
|
Now you can install using **Dockerimage** or **manually**:
|
|
|
|
|
|
|
|
#### Docker
|
|
|
|
Build `Dockerfile` and run
|
2023-07-10 13:34:35 +00:00
|
|
|
Also, mount `domains.txt` and `nicknames.txt` to the `/app`
|
2023-07-09 20:53:49 +00:00
|
|
|
|
|
|
|
### Manually
|
|
|
|
|
|
|
|
Install Node >= 18
|
|
|
|
|
|
|
|
Next, install packages, generate Prisma package for the project and build it:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
npm i # alias for npm install
|
|
|
|
npm run generate
|
|
|
|
npm run build
|
|
|
|
```
|
|
|
|
|
|
|
|
Migrate database and run:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
npm run migrate
|
|
|
|
npm start
|
|
|
|
```
|