Commit 48d100c0 authored by nanahira's avatar nanahira

start Koishi application on ModuleInit

parent f75e77b3
...@@ -27,7 +27,7 @@ Router.prepare = () => {}; ...@@ -27,7 +27,7 @@ Router.prepare = () => {};
@Injectable() @Injectable()
export class KoishiService export class KoishiService
extends App extends App
implements OnModuleInit, OnApplicationBootstrap, OnModuleDestroy implements OnModuleInit, OnModuleDestroy
{ {
private readonly globalInterceptors: KoishiCommandInterceptorRegistration[]; private readonly globalInterceptors: KoishiCommandInterceptorRegistration[];
constructor( constructor(
...@@ -86,9 +86,6 @@ export class KoishiService ...@@ -86,9 +86,6 @@ export class KoishiService
ctx.plugin(pluginDef.plugin, pluginDef.options); ctx.plugin(pluginDef.plugin, pluginDef.options);
} }
} }
}
async onApplicationBootstrap() {
await this.metascan.registerContext(this.any()); await this.metascan.registerContext(this.any());
return this.start(); return this.start();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment