diff --git a/apps/query.js b/apps/query.js index 1aa081a..2028bd6 100644 --- a/apps/query.js +++ b/apps/query.js @@ -41,10 +41,6 @@ export class query extends plugin { { reg: "^#竹白(.*)", fnc: "zhubaiSearch", - }, - { - reg: "^#(wiki|百科)(.*)$", - fnc: "wiki", } ], }); @@ -229,49 +225,6 @@ export class query extends plugin { return true; } - // 百科 - async wiki(e) { - const key = e.msg.replace(/#|百科|wiki/g, "").trim(); - const url = `https://xiaoapi.cn/API/bk.php?m=json&type=sg&msg=${ encodeURI(key) }`; - const bdUrl = `https://xiaoapi.cn/API/bk.php?m=json&type=bd&msg=${ encodeURI(key) }`; - const bkRes = await Promise.all([ - axios - .get(bdUrl, { - headers: { - "User-Agent": COMMON_USER_AGENT, - }, - timeout: 10000, - }) - .then(resp => { - return resp.data; - }), - axios - .get(url, { - headers: { - "User-Agent": COMMON_USER_AGENT, - }, - timeout: 10000, - }) - .then(resp => { - return resp.data; - }), - ]).then(async res => { - return res.map(item => { - return { - message: ` - 解释:${ _.get(item, "msg") }\n - 详情:${ _.get(item, "more") }\n - `, - nickname: e.sender.card || e.user_id, - user_id: e.user_id, - }; - }); - // 小鸡解释:${ _.get(data2, 'content') } - }); - await e.reply(await Bot.makeForwardMsg(bkRes)); - return true; - } - // 删除标签 removeTag(title) { const titleRex = /<[^>]+>/g;