From 65d067974503fdeec1cef5d0a206eb45c3f2e0c8 Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Sun, 5 Mar 2023 21:14:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20task=E6=A0=BC=E5=BC=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/entertainment.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/entertainment.js b/apps/entertainment.js index c2b245c..76b6d76 100644 --- a/apps/entertainment.js +++ b/apps/entertainment.js @@ -11,14 +11,6 @@ export class Entertainment extends plugin { dsc: 'ChatGPT-Plugin娱乐小功能', event: 'message', priority: 500, - task: [ - { - // 每半小时 - cron: '*/30 * * * ?', - name: 'ChatGPT主动随机说话', - fnc: 'sendRandomMessage' - } - ], rule: [ { reg: '^#(chatgpt|ChatGPT)打招呼', @@ -26,6 +18,14 @@ export class Entertainment extends plugin { } ] }) + this.task = [ + { + // 每半小时 + cron: '*/30 * * * ?', + name: 'ChatGPT主动随机说话', + fnc: this.sendRandomMessage.bind(this) + } + ] } async sendMessage (e) {