Compare commits
3 Commits
82f5f9ca85
...
18b5e37fd9
Author | SHA1 | Date | |
---|---|---|---|
|
18b5e37fd9 | ||
|
2a6cbecd28 | ||
|
8e20436570 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,7 +2,8 @@
|
||||
.gitignore
|
||||
karma.db
|
||||
proxies.db
|
||||
proxy_lists/
|
||||
session.txt
|
||||
socks5.txt
|
||||
venv/
|
||||
plugins/__pycache__/
|
||||
simplematrixbotlib/
|
||||
|
32
0001-Fixed-stability-issue-in-api.py.patch
Normal file
32
0001-Fixed-stability-issue-in-api.py.patch
Normal file
@ -0,0 +1,32 @@
|
||||
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
|
||||
|
13
README.md
13
README.md
@ -11,7 +11,16 @@ 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.
|
||||
- Extensible: Users can add new commands by creating additional plugin modules.
|
||||
|
||||
## Installation
|
||||
## Automatic 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:
|
||||
`git clone https://git.stoned.io/hash/FunguyBot`
|
||||
@ -29,7 +38,7 @@ MATRIX_PASS=""
|
||||
```
|
||||
|
||||
4. Run the bot:
|
||||
`python funguy.py`, or `chmod +x funguy.py`, then `./funguy.py` in the bot directory.
|
||||
`python funguy.py`, or `chmod +x funguy.py`, then `./funguy.py`
|
||||
|
||||
|
||||
## Usage
|
||||
|
51
install.sh
Executable file
51
install.sh
Executable file
@ -0,0 +1,51 @@
|
||||
#!/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'"
|
@ -29,7 +29,6 @@ pytube==15.0.0
|
||||
referencing==0.33.0
|
||||
requests==2.31.0
|
||||
rpds-py==0.17.1
|
||||
simplematrixbotlib==2.10.3
|
||||
toml==0.10.2
|
||||
unpaddedbase64==2.1.0
|
||||
urllib3==2.2.0
|
||||
|
Loading…
Reference in New Issue
Block a user