From c51bc70ef48d59e133d7984591510fa003250f3e Mon Sep 17 00:00:00 2001 From: zhiyu1998 Date: Wed, 22 Mar 2023 10:07:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=B8=8D=E7=A8=B3=E5=AE=9A=E5=8A=9F=E8=83=BD#=E7=83=AD?= =?UTF-8?q?=E6=90=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/query.js | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/apps/query.js b/apps/query.js index f4dd2cb..95fb869 100644 --- a/apps/query.js +++ b/apps/query.js @@ -28,10 +28,6 @@ export class query extends plugin { reg: "^#(cat)$", fnc: "cat", }, - { - reg: "^#热搜(.*)", - fnc: "hotSearch", - }, { reg: "^#推荐软件$", fnc: "softwareRecommended", @@ -119,29 +115,6 @@ export class query extends plugin { return !!(await this.reply(await Bot.makeForwardMsg(images))); } - async hotSearch(e) { - const platform = e.msg.replace('#热搜', "").trim(); - const apiAddr = HOT_SEARCH_ACTIONS?.[platform] - if (_.isEmpty(apiAddr)) { - e.reply('暂时无法查询该平台的热搜'); - return true; - } - const hots = await fetch(apiAddr).then(async res => { - const resJson = JSON.parse(await res.text())?.data; - return resJson.map((item, index) => { - const {name, hot, url} = item - const template = `${index+1}. 标题:${name}\n热度:${_.isNaN(hot) ? Number(hot/TEN_THOUSAND).toFixed(1)+"万" : '暂无'}\n链接:${url}` - return { - message: { type: "text", text: template }, - nickname: e.sender.card || e.user_id, - user_id: e.user_id - } - }) - }); - e.reply(await Bot.makeForwardMsg(hots)) - return true; - } - async softwareRecommended(e) { // 接口 const pcUrl = "https://www.ghxi.com/ghapi?type=query&n=pc";