!41 修复了崩坏星穹铁道与原神的公告

Merge pull request !41 from Rainbow/N/A
This commit is contained in:
Kokomi 2023-05-11 22:30:44 +00:00 committed by Gitee
commit 2af6575875
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()
} }