添加bark通知图标

This commit is contained in:
tanmx 2022-09-16 09:36:21 +08:00
parent 0b99641150
commit 298cd67d4b
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')}")