Update README.md
This commit is contained in:
parent
9b26aa113b
commit
b92356a42d
31
README.md
31
README.md
@ -1,7 +1,8 @@
|
|||||||
Who is GarfBot?
|
Who is GarfBot?
|
||||||
======
|
======
|
||||||
|
![garfield](https://www.crate.zip/garfield.png)
|
||||||
|
|
||||||
GarfBot is a discord bot that uses openai generative pre-trained AI models to produce text and images for your personal entertainment and companionship. There are a few ways you can interact with him on discord, either in a server you've invited him to or by direct message:
|
GarfBot is a discord bot that uses OpenAI's generative pre-trained models to produce text and images for your personal entertainment and companionship. There are a few ways you can interact with him on discord, either in a public server or by direct message:
|
||||||
|
|
||||||
`hey garfield {prompt}`
|
`hey garfield {prompt}`
|
||||||
Responds with text.
|
Responds with text.
|
||||||
@ -13,7 +14,7 @@ Responds with an image.
|
|||||||
Responds with iputils-ping result from target.
|
Responds with iputils-ping result from target.
|
||||||
|
|
||||||
`garfpic {target}`
|
`garfpic {target}`
|
||||||
Responds with dnsutils lookup result from target.
|
Responds with dns lookup result from target.
|
||||||
|
|
||||||
`garfpic {target}`
|
`garfpic {target}`
|
||||||
Responds with nmap scan result from target.
|
Responds with nmap scan result from target.
|
||||||
@ -24,8 +25,13 @@ Responds with 10 grocery {item}s from the nearest Kroger location, listed from l
|
|||||||
Installation
|
Installation
|
||||||
======
|
======
|
||||||
|
|
||||||
To get started, `git clone https://git.crate.zip/crate/garfbot.git` and create a `config.py` file in the root directory.
|
To get started, clone this repo and create a config file.
|
||||||
Open your favorite text editor and add your various API tokens:
|
|
||||||
|
```console
|
||||||
|
$ git clone https://git.crate.zip/crate/garfbot.git && cd garfbot/ && nano config.py
|
||||||
|
```
|
||||||
|
|
||||||
|
Add your various API tokens:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
GARFBOT_TOKEN = "Discord API token"
|
GARFBOT_TOKEN = "Discord API token"
|
||||||
@ -36,17 +42,20 @@ GIF_TOKEN = "tenor.com API token"
|
|||||||
I recommend building a docker image using the included DockerFile as a template. Run the container binding /usr/src/app to GarfBot's CWD:
|
I recommend building a docker image using the included DockerFile as a template. Run the container binding /usr/src/app to GarfBot's CWD:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
crate@raspberrypi:~/garfbot $ docker build -t garfbot .
|
$ docker build -t garfbot .
|
||||||
crate@raspberrypi:~/garfbot $ docker run -d --restart always -v $PWD:/usr/src/app --name garfbot garfbot
|
$ docker run -d --restart always -v $PWD:/usr/src/app --name garfbot garfbot
|
||||||
```
|
```
|
||||||
|
|
||||||
In case you'd rather not do it manually, a `garfbot.tf` file has been included to launch GarfBot and his friends' containers.
|
In case you'd rather not do it manually, a `garfbot.tf` file has been included to launch GarfBot and his friends' containers.
|
||||||
|
|
||||||
If you prefer to install dependencies on you own host and run as a systemd service:
|
If you prefer to install dependencies on you own host and run as a systemd service:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
crate@raspberrypi:~/garfbot $ sudo nano /etc/systemd/system/garfbot.service
|
$ sudo nano /etc/systemd/system/garfbot.service
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace {user} with your username:
|
Replace {user} with your username:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=garfbot
|
Description=garfbot
|
||||||
@ -62,9 +71,11 @@ ExecStart=/usr/bin/python garfbot.py
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
```
|
```
|
||||||
|
|
||||||
And finally:
|
And finally:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
crate@raspberrypi:~/garfbot $ sudo systemctl daemon-reload
|
$ sudo systemctl daemon-reload
|
||||||
crate@raspberrypi:~/garfbot $ sudo systemctl enable garfbot
|
$ sudo systemctl enable garfbot
|
||||||
crate@raspberrypi:~/garfbot $ sudo systemctl start garfbot
|
$ sudo systemctl start garfbot
|
||||||
```
|
```
|
Loading…
Reference in New Issue
Block a user