Merge pull request #261 from tanmx/tanmx-patch

添加bark通知图标
This commit is contained in:
Womsxd 2022-09-16 12:06:16 +08:00 committed by GitHub
commit 8028304c7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,8 @@ secret=
[bark]
api_url=https://api.day.app
token=ssXXX
#bark通知图标可选genshin,mihoyobbs,hokai2,honkai3rd,tears_of_themis
icon=genshin
[gotify]
api_url=http://xxx.xxx.cn

View File

@ -174,7 +174,7 @@ def dingrobot(send_title, push_message):
# Bark
def bark(send_title, push_message):
rep = http.get(
url=f'{cfg.get("bark", "api_url")}/{cfg.get("bark", "token")}/{send_title}/{push_message}'
url=f'{cfg.get("bark", "api_url")}/{cfg.get("bark", "token")}/{send_title}/{push_message}?icon=https://cdn.jsdelivr.net/gh/tanmx/pic@main/mihoyo/{cfg.get("bark", "icon")}.png'
).json()
log.info(f"推送结果:{rep.get('message')}")