refactor: add core into all event constructors

This commit is contained in:
Wesley F. Young
2024-08-10 22:11:57 +08:00
parent 2c14281168
commit 6d954b2d5d
20 changed files with 97 additions and 57 deletions

View File

@@ -1,11 +1,19 @@
import { OB11BaseNoticeEvent } from '../notice/OB11BaseNoticeEvent';
import { EventType } from '../OB11BaseEvent';
import { NapCatCore } from '@/core';
export class OB11FriendRequestEvent extends OB11BaseNoticeEvent {
post_type = EventType.REQUEST;
user_id: number = 0;
request_type = 'friend' as const;
comment: string = '';
flag: string = '';
request_type = 'friend';
user_id: number;
comment: string;
flag: string;
constructor(core: NapCatCore, user_id: number, comment: string, flag: string) {
super(core);
this.user_id = user_id;
this.comment = comment;
this.flag = flag;
}
}