From aa7e76e653742d64fec8bbf0108a14d1b33fed02 Mon Sep 17 00:00:00 2001 From: Hash Borgir Date: Tue, 13 Feb 2024 17:01:58 -0700 Subject: [PATCH] README updated --- README.md | 61 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1da034d..d45a3a6 100644 --- a/README.md +++ b/README.md @@ -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 `: Check if the specified domain or IP address is reachable. - `!karma `: View or modify karma points for a user. +- `!funguy ` Talk to the Tech AI LLM +- `!music ` Talk to the music knowledge LLM For a complete list of available commands and their descriptions, use the `!commands` command.