修改 cqhttp 的发送的数据类型为 JSON ,避免使用表单可能出现的转码问题 (#543)

Co-authored-by: shaochuan.wu <shaochuan.wu@fit2cloud.com>
This commit is contained in:
WiSoniC 2021-08-09 14:04:49 +08:00 committed by GitHub
parent 6e36e06dda
commit eb15e096e3

View File

@ -208,9 +208,9 @@ function gobotNotify(text, desp, time = 2100) {
if (GOBOT_URL) {
const options = {
url: `${GOBOT_URL}?access_token=${GOBOT_TOKEN}&${GOBOT_QQ}`,
body: `message=${text}\n${desp}`,
json: {message:`${text}\n${desp}`},
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Type': 'application/json',
},
timeout,
};