Compare commits

..

1 commit

Author SHA1 Message Date
Take-John f078a88547
Merge 1ca93c4edf into 830c9c2ecd 2024-03-25 01:38:42 +09:00

View file

@ -4,11 +4,11 @@ import 藍, { InstallerResult } from '@/ai.js';
export default abstract class Module {
public abstract readonly name: string;
private maybeAi?: ;
protected ai: ;
private doc: any;
public init(ai: ) {
this.maybeAi = ai;
this.ai = ai;
this.doc = this.ai.moduleData.findOne({
module: this.name
@ -24,13 +24,6 @@ export default abstract class Module {
public abstract install(): InstallerResult;
protected get ai(): {
if (this.maybeAi == null) {
throw new TypeError('This module has not been initialized');
}
return this.maybeAi;
}
@bindThis
protected log(msg: string) {
this.ai.log(`[${this.name}]: ${msg}`);