mirror of
https://github.com/TDSCDMAA/AutoMihoyoBBS.git
synced 2026-06-02 18:43:42 +08:00
钉钉机器人配置调整
Signed-off-by: TingHsi <rnb520@vip.qq.com>
This commit is contained in:
parent
b3dc262bc7
commit
dec7a6d065
@ -108,9 +108,9 @@
|
||||
## dingrobot
|
||||
钉钉群机器人
|
||||
|
||||
[dingrobot]中的api_url填写**Webhook**地址
|
||||
**webhook**填写**Webhook**地址
|
||||
|
||||
[setting]中的**push_token**用于填写**安全设置**中**加签**的密钥,此选项为可选项
|
||||
**secret**填写**安全设置**中**加签**的密钥,此选项为可选项
|
||||
|
||||
填写示例
|
||||
|
||||
@ -118,9 +118,9 @@
|
||||
[setting]
|
||||
enable=true
|
||||
push_server=dingrobot
|
||||
push_token=
|
||||
|
||||
[dingrobot]
|
||||
api_url=https://oapi.dingtalk.com/robot/send?access_token=XXX
|
||||
webhook=https://oapi.dingtalk.com/robot/send?access_token=XXX
|
||||
secret=
|
||||
```
|
||||
|
||||
|
||||
@ -27,4 +27,5 @@ api_url=https://api2.pushdeer.com
|
||||
token=
|
||||
|
||||
[dingrobot]
|
||||
api_url=https://oapi.dingtalk.com/robot/send?access_token=XXX
|
||||
webhook=https://oapi.dingtalk.com/robot/send?access_token=XXX
|
||||
secret=
|
||||
4
push.py
4
push.py
@ -105,8 +105,8 @@ def pushdeer(status, push_message):
|
||||
|
||||
# 钉钉群机器人
|
||||
def dingrobot(status, push_message):
|
||||
api_url = cfg.get('dingrobot', 'api_url') # https://oapi.dingtalk.com/robot/send?access_token=XXX
|
||||
secret = cfg.get('setting', 'push_token') # 安全设置 -> 加签 -> 密钥
|
||||
api_url = cfg.get('dingrobot', 'webhook') # https://oapi.dingtalk.com/robot/send?access_token=XXX
|
||||
secret = cfg.get('dingrobot', 'secret') # 安全设置 -> 加签 -> 密钥 -> SEC*
|
||||
|
||||
if secret:
|
||||
timestamp = str(round(time.time() * 1000))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user