1
0
mirror of https://github.com/okyyds/yyds.git synced 2026-07-13 18:21:16 +08:00
This commit is contained in:
yyds
2022-02-18 18:51:53 +08:00
parent 6b4409faf0
commit c233cb3ced

View File

@@ -1677,17 +1677,14 @@ function gobotNotify(text, desp, time = 2100) {
return new Promise((resolve) => { return new Promise((resolve) => {
if (GOBOT_URL) { if (GOBOT_URL) {
const options = { const options = {
url: `${GOBOT_URL}?access_token=${GOBOT_TOKEN}&${GOBOT_QQ}`, url: `${GOBOT_URL}?access_token=${GOBOT_TOKEN}&${GOBOT_QQ}&message=标题:${encodeURIComponent(text+"\n")}内容:${encodeURIComponent(desp)}`,
json: {
message: `${text}\n${desp}`
},
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded',
}, },
timeout, timeout,
}; };
setTimeout(() => { setTimeout(() => {
$.post(options, (err, resp, data) => { $.get(options, (err, resp, data) => {
try { try {
if (err) { if (err) {
console.log('发送go-cqhttp通知调用API失败\n'); console.log('发送go-cqhttp通知调用API失败\n');