小改动

This commit is contained in:
Womsxd 2022-01-09 18:28:40 +08:00
parent c9f6a9cc78
commit 0522827b42
No known key found for this signature in database
GPG Key ID: 0FE76418EE689B68
4 changed files with 7 additions and 6 deletions

2
.gitignore vendored
View File

@ -138,4 +138,4 @@ dmypy.json
config/*.json config/*.json
# push配置 # push配置
config/push.ini config/*.ini

View File

@ -1,6 +1,6 @@
[setting] [setting]
enable=false enable=false
#共有 cqhttp ftqq(sever酱) Pushplus #共有 cqhttp ftqq(sever酱) pushplus
push_server=cqhttp push_server=cqhttp
#server酱和pushplus的推送token #server酱和pushplus的推送token
push_token=123456 push_token=123456

View File

@ -1,6 +1,6 @@
[setting] [setting]
enable=false enable=false
#共有 cqhttp ftqq(sever酱) Pushplus #共有 cqhttp ftqq(sever酱) pushplus
push_server=cqhttp push_server=cqhttp
#server酱和pushplus的推送token #server酱和pushplus的推送token
push_token=123456 push_token=123456

View File

@ -51,10 +51,11 @@ def cq_http(status, push_message):
def push(status, push_message): def push(status, push_message):
load_config() load_config()
if cfg.getboolean('setting', 'enable'): if cfg.getboolean('setting', 'enable'):
if cfg.get('setting', 'push_server') == "cqhttp": push_server = cfg.get('setting', 'push_server').lower()
if push_server == "cqhttp":
cq_http(status, push_message) cq_http(status, push_message)
elif cfg.get('setting', 'push_server') == "ftqq": elif push_server == "ftqq":
ftqq(status, push_message) ftqq(status, push_message)
elif cfg.get('setting', 'push_server') == "pushplus": elif push_server == "pushplus":
pushplus(status, push_message) pushplus(status, push_message)
return 0 return 0