fix: 优化解析

This commit is contained in:
ningmengchongshui 2024-06-09 23:19:06 +08:00
parent 068b0e60b7
commit 0602eb0041
2 changed files with 18 additions and 18 deletions

View File

@ -17,8 +17,8 @@ class ListenerLoader {
if (!listener.default) return
/**
*
*/
*
*/
listener = new listener.default()
/**
@ -68,7 +68,6 @@ class ListenerLoader {
this.init(await import('./events/offline.js'), './events/offline.js')
this.init(await import('./events/online.js'), './events/online.js')
this.init(await import('./events/request.js'), './events/request.js')
}
}

View File

@ -68,14 +68,15 @@ export class plugin {
priority && (this.priority = priority)
/** 定时任务,可以是数组 */
task && (this.task = {
/** 任务名 */
name: task?.name ?? '',
/** 任务方法名 */
fnc: task?.fnc ?? '',
/** 任务cron表达式 */
cron: task?.cron ?? ''
})
task &&
(this.task = {
/** 任务名 */
name: task?.name ?? '',
/** 任务方法名 */
fnc: task?.fnc ?? '',
/** 任务cron表达式 */
cron: task?.cron ?? ''
})
/** 命令规则 */
rule && (this.rule = rule)