From 19735abf9c9ba246d9ac6e2c512b3418e66c5373 Mon Sep 17 00:00:00 2001 From: Womsxd <45663319+Womsxd@users.noreply.github.com> Date: Sun, 9 Jan 2022 17:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/push.ini | 12 ++++++++---- config/push.ini.example | 14 +++++++++----- push.py | 3 +-- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/config/push.ini b/config/push.ini index bdec67d..82709b6 100644 --- a/config/push.ini +++ b/config/push.ini @@ -1,8 +1,12 @@ [setting] enable=false -push_server=cqhttp #共有 cqhttp ftqq(sever酱) Pushplus -push_token=123456 #server酱和pushplus的推送token +#共有 cqhttp ftqq(sever酱) Pushplus +push_server=cqhttp +#server酱和pushplus的推送token +push_token=123456 [cqhttp] -cqhttp_url=http://127.0.0.1:5000/send_private_msg #cqhttp的服务端地址 -cqhttp_qq=10001 #推送给谁 \ No newline at end of file +#cqhttp的服务端地址 +cqhttp_url=http://127.0.0.1:5000/send_private_msg +#推送给谁 +cqhttp_qq=10001 \ No newline at end of file diff --git a/config/push.ini.example b/config/push.ini.example index 6f7338e..82709b6 100644 --- a/config/push.ini.example +++ b/config/push.ini.example @@ -1,8 +1,12 @@ [setting] -enable=true -push_server=cqhttp #共有 cqhttp ftqq(sever酱) Pushplus -push_token=123456 #server酱和pushplus的推送token +enable=false +#共有 cqhttp ftqq(sever酱) Pushplus +push_server=cqhttp +#server酱和pushplus的推送token +push_token=123456 [cqhttp] -cqhttp_url=http://127.0.0.1:5000/send_private_msg #cqhttp的服务端地址 -cqhttp_qq=10001 #推送给谁 \ No newline at end of file +#cqhttp的服务端地址 +cqhttp_url=http://127.0.0.1:5000/send_private_msg +#推送给谁 +cqhttp_qq=10001 \ No newline at end of file diff --git a/push.py b/push.py index 469b539..18d2250 100644 --- a/push.py +++ b/push.py @@ -6,8 +6,7 @@ cfg = ConfigParser() def load_config(): - config_path = os.path.dirname(os.path.realpath(__file__)) + "/push.ini" - cfg.read(config_path) + cfg.read(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'push.ini')) def title(status):