From fe09ee1a1d19cd6290b41e506fb2e35b845511b3 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Thu, 20 Jan 2022 21:03:15 +0800 Subject: [PATCH] jd_cmd fix a bug --- jd_cmd.py | 4 ++-- list.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jd_cmd.py b/jd_cmd.py index e51d29a..ac8d932 100644 --- a/jd_cmd.py +++ b/jd_cmd.py @@ -2,7 +2,7 @@ from pagermaid import version from pagermaid.listener import listener -from pagermaid.utils import lang, alias_command, obtain_message, post +from pagermaid.utils import lang, alias_command, obtain_message, client @listener(is_plugin=False, outgoing=True, command=alias_command("jd_cmd"), @@ -14,7 +14,7 @@ async def jd_cmd(context): except ValueError: return await context.edit("[jd_cmd] " + lang("msg_ValueError")) try: - data = (await post("https://api.jds.codes/jCommand", data={"code": text}, json_body=True)).json() + data = (await client.post("https://api.jds.codes/jCommand", json={"code": text})).json() except: return await context.edit("[jd_cmd] 网络错误!") if data["code"] != 200: diff --git a/list.json b/list.json index f7d70ee..4abdf25 100644 --- a/list.json +++ b/list.json @@ -812,7 +812,7 @@ }, { "name": "jd_cmd", - "version": "1.011", + "version": "1.02", "section": "chat", "maintainer": "xtaodada", "size": "1.00 kb",