小改动
This commit is contained in:
parent
c9f6a9cc78
commit
0522827b42
2
.gitignore
vendored
2
.gitignore
vendored
@ -138,4 +138,4 @@ dmypy.json
|
|||||||
config/*.json
|
config/*.json
|
||||||
|
|
||||||
# push配置
|
# push配置
|
||||||
config/push.ini
|
config/*.ini
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
7
push.py
7
push.py
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user