修复了开启铁道公告推送会覆盖原神公告推送的意外错误

Signed-off-by: Rainbow <9510289+rainbowwarmth@user.noreply.gitee.com>
This commit is contained in:
Rainbow 2023-05-11 08:09:54 +00:00 committed by Gitee
parent aa5d9ab1df
commit 1dd220e505
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 15 additions and 7 deletions

View File

@ -60,12 +60,20 @@ export class mysNews extends plugin {
this.file = './plugins/genshin/config/mys.pushNews.yaml' this.file = './plugins/genshin/config/mys.pushNews.yaml'
/** 定时任务 */ /** 定时任务 */
this.task = { this.task = [
{
cron: gsCfg.getConfig('mys', 'pushNews').pushTime, cron: gsCfg.getConfig('mys', 'pushNews').pushTime,
name: '米游社公告推送任务', name: '米游社公告推送任务',
fnc: () => this.mysNewsTask(), fnc: () => this.mysNewsTask(),
log: false log: false
},
{
cron: gsCfg.getConfig('mys', 'pushNews').pushTime,
name: '崩坏星穹铁道公告推送任务',
fnc: () => this.srmysNewsTask(),
log: false
} }
]
} }
async init () { async init () {
@ -87,7 +95,7 @@ export class mysNews extends plugin {
} }
async mysNewsTask () { async mysNewsTask () {
let mysNews = new srNews(this.e) let mysNews = new MysNews(this.e)
await mysNews.mysNewsTask() await mysNews.mysNewsTask()
} }