mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-12 16:00:27 +00:00
refactor: rename OB11BaseEvent
This commit is contained in:
19
src/onebot/event/OneBotEvent.ts
Normal file
19
src/onebot/event/OneBotEvent.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NapCatCore } from '@/core';
|
||||
|
||||
export enum EventType {
|
||||
META = 'meta_event',
|
||||
REQUEST = 'request',
|
||||
NOTICE = 'notice',
|
||||
MESSAGE = 'message',
|
||||
MESSAGE_SENT = 'message_sent',
|
||||
}
|
||||
|
||||
export abstract class OneBotEvent {
|
||||
time = Math.floor(Date.now() / 1000);
|
||||
self_id: number;
|
||||
abstract post_type: EventType;
|
||||
|
||||
constructor(core: NapCatCore) {
|
||||
this.self_id = parseInt(core.selfInfo.uin);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user