Skip to content

Commit

Permalink
add plugin manager UsergeTeam#25, custom progress UsergeTeam#24, gmake
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 committed May 18, 2020
1 parent 1ec9a61 commit 4772769
Show file tree
Hide file tree
Showing 29 changed files with 1,669 additions and 578 deletions.
8 changes: 8 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@
"SUDO_TRIGGER": {
"description": "set command prefix for SUDO users",
"required": false
},
"FINISHED_PROGRESS_STR": {
"description": "single character for finished progress",
"required": false
},
"UNFINISHED_PROGRESS_STR": {
"description": "single character for unfinished progress",
"required": false
}
},
"addons": [
Expand Down
8 changes: 8 additions & 0 deletions config.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ SUDO_TRIGGER = "!"
UPSTREAM_REPO = ""


# single character for finished progress
FINISHED_PROGRESS_STR = '█'


# single character for unfinished progress
UNFINISHED_PROGRESS_STR = '░'


# ----------- Only If Using Heroku ----------- #


Expand Down
7 changes: 7 additions & 0 deletions userge/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ class Config:

SUDO_TRIGGER = os.environ.get("SUDO_TRIGGER", '!')

FINISHED_PROGRESS_STR = os.environ.get("FINISHED_PROGRESS_STR", '█')

UNFINISHED_PROGRESS_STR = os.environ.get("UNFINISHED_PROGRESS_STR", '░')

SUDO_USERS: Set[int] = set()

ALLOWED_COMMANDS: Set[str] = set()
Expand Down Expand Up @@ -154,8 +158,11 @@ class Config:
os.chmod(path, 0o755)

if Config.LOAD_UNOFFICIAL_PLUGINS:
_LOG.debug("Loading UnOfficial Plugins...")
os.system(f"git clone https://github.com/UsergeTeam/Userge-Plugins.git")
os.system("pip3 install -U pip")
os.system("pip3 install -r Userge-Plugins/requirements.txt")
os.system("rm -rf userge/plugins/unof_plugins/")
os.system("mv Userge-Plugins/plugins/ userge/plugins/unof_plugins/")
os.system("rm -rf Userge-Plugins/")
_LOG.debug("UnOfficial Plugins Loaded Successfully!")
6 changes: 4 additions & 2 deletions userge/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#
# All rights reserved.

from pyrogram import Filters

from .database import get_collection
from .client import Userge, Filters
from .message import Message
from .ext import pool
from .client import Userge
from .methods import Message
Loading

0 comments on commit 4772769

Please sign in to comment.