From 1dd220e505f50e40335a97989d584e0d5a79bac9 Mon Sep 17 00:00:00 2001 From: Rainbow <9510289+rainbowwarmth@user.noreply.gitee.com> Date: Thu, 11 May 2023 08:09:54 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E9=93=81=E9=81=93=E5=85=AC=E5=91=8A=E6=8E=A8=E9=80=81=E4=BC=9A?= =?UTF-8?q?=E8=A6=86=E7=9B=96=E5=8E=9F=E7=A5=9E=E5=85=AC=E5=91=8A=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E7=9A=84=E6=84=8F=E5=A4=96=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rainbow <9510289+rainbowwarmth@user.noreply.gitee.com> --- plugins/genshin/apps/mysNews.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/plugins/genshin/apps/mysNews.js b/plugins/genshin/apps/mysNews.js index 8ca4cca..daa3f52 100644 --- a/plugins/genshin/apps/mysNews.js +++ b/plugins/genshin/apps/mysNews.js @@ -60,12 +60,20 @@ export class mysNews extends plugin { this.file = './plugins/genshin/config/mys.pushNews.yaml' /** 定时任务 */ - this.task = { - cron: gsCfg.getConfig('mys', 'pushNews').pushTime, - name: '米游社公告推送任务', - fnc: () => this.mysNewsTask(), - log: false - } + this.task = [ + { + cron: gsCfg.getConfig('mys', 'pushNews').pushTime, + name: '米游社公告推送任务', + fnc: () => this.mysNewsTask(), + log: false + }, + { + cron: gsCfg.getConfig('mys', 'pushNews').pushTime, + name: '崩坏星穹铁道公告推送任务', + fnc: () => this.srmysNewsTask(), + log: false + } + ] } async init () { @@ -87,7 +95,7 @@ export class mysNews extends plugin { } async mysNewsTask () { - let mysNews = new srNews(this.e) + let mysNews = new MysNews(this.e) await mysNews.mysNewsTask() }