Compare commits

..

No commits in common. "18b5e37fd991ccebdf8d28b51c6f62dc8271b4b8" and "82f5f9ca85b6df6c0f428d542796e225aa7ac495" have entirely different histories.

5 changed files with 4 additions and 96 deletions

3
.gitignore vendored
View File

@ -2,8 +2,7 @@
.gitignore .gitignore
karma.db karma.db
proxies.db proxies.db
proxy_lists/
session.txt session.txt
socks5.txt socks5.txt
venv/ venv/
plugins/__pycache__/
simplematrixbotlib/

View File

@ -1,32 +0,0 @@
From 4aa5b913f75e32f6ed06fc6e691daa856824b26a Mon Sep 17 00:00:00 2001
From: Hash Borgir <atirjavid@gmail.com>
Date: Mon, 12 Feb 2024 19:12:05 -0700
Subject: [PATCH] Fixed stability issue in api.py
---
simplematrixbotlib/api.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/simplematrixbotlib/api.py b/simplematrixbotlib/api.py
index 1d87b3d..13a78cf 100644
--- a/simplematrixbotlib/api.py
+++ b/simplematrixbotlib/api.py
@@ -295,6 +295,7 @@ class Api:
pass # Successful upload
else:
print(f"Failed Upload Response: {resp}")
+ return
content = {
"body": os.path.basename(image_filepath),
@@ -342,6 +343,7 @@ class Api:
pass # Successful upload
else:
print(f"Failed Upload Response: {resp}")
+ return
content = {
"body": os.path.basename(video_filepath),
--
2.34.1

View File

@ -11,16 +11,7 @@ Matrix Bot is a Python-based chat bot designed to work with Matrix, an open netw
- Plugin system: Each command is implemented as a separate plugin module, allowing for easy customization and extension. - Plugin system: Each command is implemented as a separate plugin module, allowing for easy customization and extension.
- Extensible: Users can add new commands by creating additional plugin modules. - Extensible: Users can add new commands by creating additional plugin modules.
## Automatic Installation ## Installation
1. `./install.sh` or `bash install.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`
## Manual Installation
1. Clone the repository: 1. Clone the repository:
`git clone https://git.stoned.io/hash/FunguyBot` `git clone https://git.stoned.io/hash/FunguyBot`
@ -38,7 +29,7 @@ MATRIX_PASS=""
``` ```
4. Run the bot: 4. Run the bot:
`python funguy.py`, or `chmod +x funguy.py`, then `./funguy.py` `python funguy.py`, or `chmod +x funguy.py`, then `./funguy.py` in the bot directory.
## Usage ## Usage

View File

@ -1,51 +0,0 @@
#!/bin/bash
# Store current directory
current_dir=$(pwd)
# Clone the simplematrixbotlib repository
git clone https://github.com/imbev/simplematrixbotlib.git
# Copy the patch file to the simplematrixbotlib directory
cp 0001-Fixed-stability-issue-in-api.py.patch $current_dir/simplematrixbotlib/
# Change directory to simplematrixbotlib
cd $current_dir/simplematrixbotlib/
# Apply the patch
git apply 0001-Fixed-stability-issue-in-api.py.patch
# Remove the patch file
rm 0001-Fixed-stability-issue-in-api.py.patch
# Install simplematrixbotlib
pip install .
# Change back to the original directory
cd $current_dir
# Install requirements
pip install -r requirements.txt
# Create .env file with required content
echo -e "MATRIX_URL = \"https://matrix.org\"\nMATRIX_USER = \"\"\nMATRIX_PASS = \"\"" > .env
# Print ASCII art
echo " _____ ____ _ "
echo "| ___| _ _ __ __ _ _ _ _ _ | __ ) ___ | |_ "
echo "| |_ | | | | '_ \ / _\` | | | | | | | | _ \ / _ \| __| "
echo "| _|| |_| | | | | (_| | |_| | |_| | | |_) | (_) | |_ "
echo "|_| \__,_|_| |_|\__, |\__,_|\__, | |____/ \___/ \__| "
echo " |___/ |___/ "
# Echo setup completion message
echo "Bot setup completed."
# Prompt user to modify funguy.py to set ADMIN_USER
echo "Modify .env file and set your credentials and homeserver"
echo "Please open funguy.py and set the ADMIN_USER variable to your admin username."
# Launch the bot
echo "Launch the bot with 'python funguy.py'"

View File

@ -29,6 +29,7 @@ pytube==15.0.0
referencing==0.33.0 referencing==0.33.0
requests==2.31.0 requests==2.31.0
rpds-py==0.17.1 rpds-py==0.17.1
simplematrixbotlib==2.10.3
toml==0.10.2 toml==0.10.2
unpaddedbase64==2.1.0 unpaddedbase64==2.1.0
urllib3==2.2.0 urllib3==2.2.0