refactor: packet x1
This commit is contained in:
105 files changed
+2286
-1962
No files matched your search
@@ -1,8 +1,7 @@
|
||||
import { NapCatCore } from '@/core';
|
||||
import { decodeProfileLikeTip } from '@/core/packet/proto/old/ProfileLike';
|
||||
|
||||
import { NapCatOneBot11Adapter } from '@/onebot';
|
||||
import { OB11ProfileLikeEvent } from '../event/notice/OB11ProfileLikeEvent';
|
||||
import { decodeProfileLikeTip } from "@/core/helper/adaptDecoder";
|
||||
|
||||
export class OneBotUserApi {
|
||||
obContext: NapCatOneBot11Adapter;
|
||||
@@ -12,6 +11,7 @@ export class OneBotUserApi {
|
||||
this.obContext = obContext;
|
||||
this.core = core;
|
||||
}
|
||||
|
||||
async parseLikeEvent(wrappedBody: Uint8Array): Promise<OB11ProfileLikeEvent | undefined> {
|
||||
const likeTip = decodeProfileLikeTip(Uint8Array.from(wrappedBody));
|
||||
if (likeTip?.msgType !== 0 || likeTip?.subType !== 203) return;
|
||||
|
||||
Reference in new issue
Block a user