diff --git a/src/core/loader.ts b/src/core/loader.ts index 3dbe04c..0ac1933 100644 --- a/src/core/loader.ts +++ b/src/core/loader.ts @@ -7,27 +7,27 @@ class ListenerLoader { client = null /** - * - * @param listener - * @param File - * @returns + * + * @param listener + * @param File + * @returns */ init = (listener, File: string) => { try { if (!listener.default) return /** - * - */ + * + */ listener = new listener.default() /** - * + * */ listener.client = this.client /** - * + * */ const on = listener.once ? 'once' : 'on' @@ -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') - } } diff --git a/src/core/plugin.ts b/src/core/plugin.ts index 4d2e8cb..5a0dc4f 100644 --- a/src/core/plugin.ts +++ b/src/core/plugin.ts @@ -66,16 +66,17 @@ export class plugin { dsc && (this.dsc = dsc) event && (this.event = event) 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)