From 7646ec854753a7dc5803bd5bc92f2978c8613a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8C=8C?= Date: Mon, 15 Apr 2024 22:29:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugins/stdin.js | 5 +---- package.json | 4 ++-- plugins/other/restart.js | 5 ++++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/plugins/stdin.js b/lib/plugins/stdin.js index 01c3a33a..da64ed45 100644 --- a/lib/plugins/stdin.js +++ b/lib/plugins/stdin.js @@ -82,13 +82,10 @@ Bot.adapter.push(new class stdinAdapter { pickFriend() { return { - user_id: this.id, - nickname: this.name, - group_id: this.id, - group_name: this.name, sendMsg: msg => this.sendMsg(msg), recallMsg: message_id => this.recallMsg(message_id), sendFile: (file, name) => this.sendFile(file, name), + pickMember: function() { return this }, } } diff --git a/package.json b/package.json index ff996620..04007208 100644 --- a/package.json +++ b/package.json @@ -39,10 +39,10 @@ "yaml": "^2.4.1" }, "devDependencies": { - "eslint": "^9.0.0", + "eslint": "^8.57.0", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-n": "^17.2.0", + "eslint-plugin-n": "^16.6.2", "eslint-plugin-promise": "^6.1.1" }, "imports": { diff --git a/plugins/other/restart.js b/plugins/other/restart.js index bd65dfbc..ce652d03 100644 --- a/plugins/other/restart.js +++ b/plugins/other/restart.js @@ -31,7 +31,10 @@ export class Restart extends plugin { if (cfg.bot.restart_time) { this.e = { logFnc: "[自动重启]" , - reply: msg => Bot.sendMasterMsg(msg), + reply: msg => { + Bot.sendMasterMsg(msg) + await Bot.sleep(5000) + }, } setTimeout(() => this.restart(), cfg.bot.restart_time*60000) }