diff --git a/apps/query.js b/apps/query.js index c8c20df..e8459b5 100644 --- a/apps/query.js +++ b/apps/query.js @@ -4,7 +4,6 @@ import fetch from "node-fetch"; // 常量 import { CAT_LIMIT, COMMON_USER_AGENT } from "../constants/constant.js"; import { - BING_SEARCH, LINUX_AI_PROMPT, LINUX_QUERY, RDOC_AI_PROMPT, @@ -64,10 +63,6 @@ export class query extends plugin { { reg: "^#R文档(.*)", fnc: "intelligentDoc", - }, - { - ret: "^#(R|r)so(.*)", - fnc: "rso", } ], }); @@ -399,21 +394,6 @@ export class query extends plugin { return; } - async rso(e) { - const question = e.msg.replace("#Rso", "").replace("#rso", "").trim(); - const resp = await fetch(BING_SEARCH.replace("{}", question), { - headers: { - "User-Agent": COMMON_USER_AGENT, - } - }); - const respJson = (await resp.json()).data; - const constructSearchRes = textArrayToMakeForward(e, respJson.map(item => - `标题:《${ item.title }》\n📝 简要:${ item.abstract }\n➡️链接:${ item.href }` - )); - await e.reply(Bot.makeForwardMsg(constructSearchRes)); - return; - } - // 删除标签 removeTag(title) { const titleRex = /<[^>]+>/g; diff --git a/constants/query.js b/constants/query.js index bb46db7..2257dd8 100644 --- a/constants/query.js +++ b/constants/query.js @@ -4,12 +4,6 @@ */ export const LINUX_QUERY = "https://api.pearktrue.cn/api/linux/?keyword={}"; -/** - * 必应搜索 - * @type {string} - */ -export const BING_SEARCH = "https://api.pearktrue.cn/api/bingsearch/?search={}"; - export const RDOC_LINK = "https://gitee.com/kyrzy0416/rconsole-plugin/raw/docs/posts/QA%E5%AE%98%E6%96%B9%E8%A7%A3%E7%AD%94.md"; export const LINUX_AI_PROMPT = "- Role: Linux命令专家\n" +