2023-04-15 22:30:03 +02:00
|
|
|
# dchat
|
|
|
|
|
|
|
|
A ChatGPT Bot for Discord.
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
Requirements:
|
|
|
|
|
|
|
|
- [git](https://git-scm.com/)
|
2023-05-20 20:22:00 +02:00
|
|
|
- [Docker](https://www.docker.com/)
|
2023-04-15 22:30:03 +02:00
|
|
|
- [OpenAI API Key](https://platform.openai.com/account/api-keys)
|
|
|
|
- [Discord Bot Token](https://javacord.org/wiki/getting-started/creating-a-bot-account.html)
|
|
|
|
|
2023-05-20 20:22:00 +02:00
|
|
|
### Clone the project
|
2023-04-15 22:30:03 +02:00
|
|
|
|
|
|
|
```shell
|
|
|
|
git clone https://git.hhhammer.de/hamburghammer/dchat.git
|
2023-05-20 20:22:00 +02:00
|
|
|
cd dchat
|
2023-04-15 22:30:03 +02:00
|
|
|
```
|
|
|
|
|
2023-05-20 20:22:00 +02:00
|
|
|
### Obtain the images
|
2023-04-15 22:30:03 +02:00
|
|
|
|
2023-05-20 20:22:00 +02:00
|
|
|
#### Build the images
|
2023-04-15 22:30:03 +02:00
|
|
|
|
|
|
|
```shell
|
2023-05-20 20:22:00 +02:00
|
|
|
docker compose build
|
2023-04-15 22:30:03 +02:00
|
|
|
```
|
|
|
|
|
2023-05-20 20:22:00 +02:00
|
|
|
### Configure environment
|
|
|
|
|
|
|
|
```shell
|
|
|
|
cp .env.example .env
|
|
|
|
```
|
|
|
|
|
|
|
|
Fill the required variables.
|
|
|
|
|
|
|
|
### Start
|
|
|
|
|
|
|
|
For the fist time we want to start the containers in the following order:
|
|
|
|
|
|
|
|
First crate the DB.
|
|
|
|
|
|
|
|
```shell
|
|
|
|
docker compose up -d db
|
|
|
|
```
|
|
|
|
|
|
|
|
Crate the required tables and migrate already existing data.
|
|
|
|
|
|
|
|
```shell
|
|
|
|
docker compose up -d migration
|
|
|
|
```
|
|
|
|
|
|
|
|
Start the final apps.
|
|
|
|
|
|
|
|
```shell
|
|
|
|
docker compose up -d
|
|
|
|
```
|
|
|
|
|
|
|
|
### Invite
|
|
|
|
|
2023-04-15 22:30:03 +02:00
|
|
|
Invite the bot through the link provided in the container logs.
|
|
|
|
|
|
|
|
```shell
|
2023-05-20 20:22:00 +02:00
|
|
|
docker compose logs bot
|
2023-04-15 22:30:03 +02:00
|
|
|
```
|
|
|
|
|
2023-11-23 22:50:36 +01:00
|
|
|
### Permissions
|
|
|
|
|
|
|
|
After starting the stack, navigate to [localhost:8081](http://localhost:8081)
|
|
|
|
and feel free to configure who and how much they can use the bot :)
|
|
|
|
|
2023-04-15 22:30:03 +02:00
|
|
|
## LICENSE
|
|
|
|
|
2023-05-16 03:06:52 +02:00
|
|
|
The software is licensed under the [MPL-2.0](LICENSE) license.
|