mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-27 05:01:25 +00:00
🔖 Update to v1.2.17
This commit is contained in:
parent
8f16c8574c
commit
76535d7e05
@ -15,7 +15,7 @@ from pyrogram import Client
|
||||
|
||||
from pyromod.listen.temp_fix import temp_fix
|
||||
|
||||
pgm_version = "1.2.16"
|
||||
pgm_version = "1.2.17"
|
||||
CMD_LIST = {}
|
||||
module_dir = __path__[0]
|
||||
working_dir = getcwd()
|
||||
|
@ -29,7 +29,7 @@ async def main():
|
||||
import_module(f"pagermaid.modules.{module_name}")
|
||||
except BaseException as exception:
|
||||
logs.info(f"{lang('module')} {module_name} {lang('error')}: {type(exception)}: {exception}")
|
||||
for plugin_name in plugin_list:
|
||||
for plugin_name in plugin_list.copy():
|
||||
try:
|
||||
import_module(f"plugins.{plugin_name}")
|
||||
except BaseException as exception:
|
||||
|
@ -59,6 +59,8 @@ class Config:
|
||||
SILENT = strtobool(os.environ.get("PGM_PGM_SILENT", config["silent"]), True)
|
||||
PROXY_ADDRESS = os.environ.get("PGM_PROXY_ADDRESS", config["proxy_addr"])
|
||||
PROXY_PORT = os.environ.get("PGM_PROXY_PORT", config["proxy_port"])
|
||||
PROXY_HTTP_ADDRESS = os.environ.get("PGM_PROXY_HTTP_ADDRESS", config["http_addr"])
|
||||
PROXY_HTTP_PORT = os.environ.get("PGM_PROXY_HTTP_PORT", config["http_port"])
|
||||
PROXY = None
|
||||
if PROXY_ADDRESS and PROXY_PORT:
|
||||
PROXY = dict(
|
||||
@ -66,6 +68,12 @@ class Config:
|
||||
hostname=PROXY_ADDRESS,
|
||||
port=int(PROXY_PORT)
|
||||
)
|
||||
elif PROXY_HTTP_ADDRESS and PROXY_HTTP_PORT:
|
||||
PROXY = dict(
|
||||
scheme="http",
|
||||
hostname=PROXY_HTTP_ADDRESS,
|
||||
port=int(PROXY_HTTP_PORT)
|
||||
)
|
||||
GIT_SOURCE = os.environ.get("PGM_GIT_SOURCE", config["git_source"])
|
||||
GIT_SOURCE = GIT_SOURCE.replace("TeamPGM/PagerMaid_Plugins/", "TeamPGM/PagerMaid_Plugins_Pyro/")
|
||||
try:
|
||||
|
@ -31,7 +31,7 @@ async def reload_all():
|
||||
importlib.reload(module)
|
||||
except BaseException as exception:
|
||||
logs.info(f"{lang('module')} {module_name} {lang('error')}: {type(exception)}: {exception}")
|
||||
for plugin_name in pagermaid.modules.plugin_list:
|
||||
for plugin_name in pagermaid.modules.plugin_list.copy():
|
||||
try:
|
||||
plugin = importlib.import_module(f"plugins.{plugin_name}")
|
||||
if plugin_name in loaded_plugins:
|
||||
|
@ -1,4 +1,4 @@
|
||||
pyrogram==2.0.61
|
||||
pyrogram==2.0.63
|
||||
TgCrypto==1.2.5
|
||||
Pillow>=8.4.0
|
||||
pytz>=2021.3
|
||||
@ -9,4 +9,4 @@ httpx
|
||||
apscheduler
|
||||
sqlitedict
|
||||
casbin==1.17.4
|
||||
sentry-sdk==1.11.0
|
||||
sentry-sdk==1.11.1
|
||||
|
@ -13,11 +13,10 @@ configure () {
|
||||
|
||||
echo "生成配置文件中 . . ."
|
||||
cp config.gen.yml $config_file
|
||||
echo "api_id、api_hash 申请地址: https://my.telegram.org/"
|
||||
printf "请输入应用程序 api_id:"
|
||||
printf "请输入应用程序 api_id(不懂请直接回车):"
|
||||
read -r api_id <&1
|
||||
sed -i "s/ID_HERE/$api_id/" $config_file
|
||||
printf "请输入应用程序 api_hash:"
|
||||
printf "请输入应用程序 api_hash(不懂请直接回车):"
|
||||
read -r api_hash <&1
|
||||
sed -i "s/HASH_HERE/$api_hash/" $config_file
|
||||
printf "请输入应用程序语言(默认:zh-cn):"
|
||||
|
@ -268,11 +268,10 @@ configure() {
|
||||
config_file=config.yml
|
||||
echo "生成配置文件中 . . ."
|
||||
cp config.gen.yml config.yml
|
||||
echo "api_id、api_hash 申请地址: https://my.telegram.org/"
|
||||
printf "请输入应用程序 api_id:"
|
||||
printf "请输入应用程序 api_id(不懂请直接回车):"
|
||||
read -r api_id <&1
|
||||
sed -i "s/ID_HERE/$api_id/" $config_file
|
||||
printf "请输入应用程序 api_hash:"
|
||||
printf "请输入应用程序 api_hash(不懂请直接回车):"
|
||||
read -r api_hash <&1
|
||||
sed -i "s/HASH_HERE/$api_hash/" $config_file
|
||||
printf "请输入应用程序语言(默认:zh-cn):"
|
||||
@ -372,6 +371,8 @@ login_screen() {
|
||||
|
||||
screen -x -S userbot -p 0 -X stuff "$phonenum"
|
||||
screen -x -S userbot -p 0 -X stuff $'\n'
|
||||
screen -x -S userbot -p 0 -X stuff "y"
|
||||
screen -x -S userbot -p 0 -X stuff $'\n'
|
||||
|
||||
sleep 2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user