README updated

This commit is contained in:
Hash Borgir 2024-02-13 17:01:58 -07:00
parent 976f806397
commit aa7e76e653

View File

@ -12,24 +12,31 @@ Matrix Bot is a Python-based chat bot designed to work with Matrix, an open netw
- Extensible: Users can add new commands by creating additional plugin modules.
## Automatic Installation
1. `./install.sh` or `bash install.sh`
Run the installation script
1. `./install-funguy.sh`
2. Set up environment variables:
Put your bot homeserver/user/pass in `.env` file
3. Launch the bot:
`python funguy.py`, or `chmod +x funguy.py`, then `./funguy.py`
2. Launch the bot:
`sudo systemctl start funguybot`
## Manual Installation
1. Clone the repository:
1. Create python venv
`python3 -m venv venv`
`source venv/bin/activate`
2. Clone the repository:
`git clone https://git.stoned.io/hash/FunguyBot`
2. Install dependencies:
`pip install -r requirements.txt`
3. Apply the patch
`cp api.py.patch simplematrixbotlib`
`git apply api.py.patch`
4. Install dependencies:
`cd simplematrixbotlib && pip install .`
`cd ../ && pip install -r requirements.txt`
3. Set up environment variables:
Create a `.env` file in the root directory of the bot and add the following variables:
Create/Edit `.env` file in the root directory of the bot and add the following variables:
```
MATRIX_URL="https://matrix.org" (or another homeserver)
@ -37,9 +44,37 @@ MATRIX_USER=""
MATRIX_PASS=""
```
4. Run the bot:
`python funguy.py`, or `chmod +x funguy.py`, then `./funguy.py`
4. Create systemd.service
Create `/etc/systemd/system/funguybot.service`
Replace `$working_directory` with your bot install path
```
[Unit]
Description=Funguy Bot Service
After=network.target
[Service]
Type=simple
User=$user
Group=$group
WorkingDirectory=$working_directory
ExecStart=$working_directory/start-funguy.sh
Restart=on-failure
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=funguybot
[Install]
WantedBy=multi-user.target
EOF
```
5. Launch Fungy
```
systemctl daemon-reload
systemctl enable funguybot
systemctl start funguybot
```
## Usage
@ -50,6 +85,8 @@ To use the bot, invite it to a Matrix room and interact with it by sending comma
- `!proxy`: Retrieve and test random SOCKS5 and HTTP proxies.
- `!isup <domain/ip>`: Check if the specified domain or IP address is reachable.
- `!karma <user>`: View or modify karma points for a user.
- `!funguy <prompt>` Talk to the Tech AI LLM
- `!music <prompt>` Talk to the music knowledge LLM
For a complete list of available commands and their descriptions, use the `!commands` command.