From 2ca1f7cf010b0f3f106d45bdd0b1f1ee1be15a23 Mon Sep 17 00:00:00 2001 From: flyingfeng <2917268843@qq.com> Date: Sun, 10 Mar 2024 18:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=A1=A5=E5=85=85=E3=80=91=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E9=A3=9E=E4=B9=A6=20bot=20=E9=AA=8C=E8=AF=81=E8=BF=87?= =?UTF-8?q?=E7=A8=8B=EF=BC=8C=E5=85=BC=E5=AE=B9=E6=96=B0=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample/notify.js | 2 +- sample/notify.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/notify.js b/sample/notify.js index 55f84bc4..4f41c2c3 100644 --- a/sample/notify.js +++ b/sample/notify.js @@ -1121,7 +1121,7 @@ function fsBotNotify(text, desp) { console.log(err); } else { data = JSON.parse(data); - if (data.StatusCode === 0) { + if (data.StatusCode === 0 || data.code === 0) { console.log('飞书发送通知消息成功🎉\n'); } else { console.log(`${data.msg}\n`); diff --git a/sample/notify.py b/sample/notify.py index ea606220..491a0ffd 100644 --- a/sample/notify.py +++ b/sample/notify.py @@ -221,7 +221,7 @@ def feishu_bot(title: str, content: str, **kwargs) -> None: data = {"msg_type": "text", "content": {"text": f"{title}\n\n{content}"}} response = requests.post(url, data=json.dumps(data)).json() - if response.get("StatusCode") == 0: + if response.get("StatusCode") == 0 or response.get("code") == 0: print("飞书 推送成功!") else: print("飞书 推送失败!错误信息如下:\n", response)