From ccbeafc390162863cf30907e9bc9ef36cfc6b8ce Mon Sep 17 00:00:00 2001 From: UCPr <2032385471@qq.com> Date: Tue, 26 Mar 2024 13:47:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugins/plugin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugins/plugin.js b/lib/plugins/plugin.js index 16bcfe6..38c0375 100644 --- a/lib/plugins/plugin.js +++ b/lib/plugins/plugin.js @@ -83,16 +83,16 @@ export default class plugin { * @param type 执行方法 * @param isGroup 是否群聊 * @param time 操作时间,默认120秒 - * @param {boolean} [silent=false] 是否静默,超时不回复消息 + * @param reply 超时时回复的内容,false则不回复 */ - setContext(type, isGroup, time = 120, silent = false) { + setContext(type, isGroup, time = 120, reply = "操作超时已取消") { const key = this.conKey(isGroup) if (!stateArr[key]) stateArr[key] = {} stateArr[key][type] = this.e if (time) stateArr[key][type].timeout = setTimeout(() => { if (stateArr[key][type]) { delete stateArr[key][type] - silent || this.reply("操作超时已取消", true) + this.reply(reply, true) } }, time * 1000) }