From 823669e7d1038346cc731b61951b7491e216f9bc Mon Sep 17 00:00:00 2001 From: zhiyu1998 Date: Fri, 25 Nov 2022 19:55:21 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20refactor:=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=92=A4=E5=9B=9E=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mystery.js | 9 ++++++--- apps/tools.js | 2 +- config/version.yaml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/mystery.js b/apps/mystery.js index a8f5b49..f3294a6 100644 --- a/apps/mystery.js +++ b/apps/mystery.js @@ -24,6 +24,8 @@ function initMongo () { }) } const mongo = initMongo() +// 60s后撤回 +const recallTime = 109 export class mystery extends plugin { constructor () { @@ -241,14 +243,15 @@ export class mystery extends plugin { await mongo.then(conn => { return conn.aggregate([{ $sample: { size: MAX_SIZE } }]).toArray() }).then((result) => { - console.log(result) - result.forEach((item) => { + result.forEach(async (item) => { images.push({ message: segment.image(item.url), ...template }) }) }) - return !!(await this.reply(await Bot.makeForwardMsg(images), false, 60)) + return !!(await this.reply(await Bot.makeForwardMsg(images), false, { + recallMsg: recallTime + })) } // 正则:获取图片 diff --git a/apps/tools.js b/apps/tools.js index 9114c9d..2efd4a9 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -83,7 +83,7 @@ export class tools extends plugin { fetch(tiktokApi) .then(resp => resp.json()) .then(json => { - this.downloadVideo(json.wm_video_url.replace("https","http")).then(video => { + this.downloadVideo(json.wm_video_url.replace("https", "http")).then(video => { e.reply(segment.video(`${this.defaultPath}${this.e.group_id || this.e.user_id}/temp.mp4`)) }) }) diff --git a/config/version.yaml b/config/version.yaml index 83faf59..23a24ce 100644 --- a/config/version.yaml +++ b/config/version.yaml @@ -5,7 +5,7 @@ 更改单个组件#任助理架构为插件架构, 添加#R帮助获取插件帮助, 添加#R版本获取插件版本, - 更新风控缓解、重构系统文件 + 更新风控缓解、重构系统文件、增加部分接口撤回操作 添加抖音实时监听分享链接, ], } \ No newline at end of file