style: lint
This commit is contained in:
1 parent
90a82dcc9a
commit
76501bae34
135 files changed
+529
-529
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { GrayTipRovokeElement, NapCatCore, RawMessage } from '@/core';
|
||||
import { NapCatOneBot11Adapter } from '@/onebot';
|
||||
import { OB11ProfileLikeEvent } from '@/onebot/event/notice/OB11ProfileLikeEvent';
|
||||
import { decodeProfileLikeTip } from "@/core/helper/adaptDecoder";
|
||||
import { decodeProfileLikeTip } from '@/core/helper/adaptDecoder';
|
||||
|
||||
export class OneBotUserApi {
|
||||
obContext: NapCatOneBot11Adapter;
|
||||
@@ -15,12 +15,12 @@ export class OneBotUserApi {
|
||||
async parseLikeEvent(wrappedBody: Uint8Array): Promise<OB11ProfileLikeEvent | undefined> {
|
||||
const likeTip = decodeProfileLikeTip(wrappedBody);
|
||||
if (likeTip?.msgType !== 0 || likeTip?.subType !== 203) return;
|
||||
this.core.context.logger.logDebug("收到点赞通知消息");
|
||||
this.core.context.logger.logDebug('收到点赞通知消息');
|
||||
const likeMsg = likeTip.content.msg;
|
||||
if (!likeMsg) return;
|
||||
const detail = likeMsg.detail;
|
||||
if (!detail) return;
|
||||
const times = detail.txt.match(/\d+/) ?? "0";
|
||||
const times = detail.txt.match(/\d+/) ?? '0';
|
||||
return new OB11ProfileLikeEvent(
|
||||
this.core,
|
||||
Number(detail.uin),
|
||||
|
||||
Reference in new issue
Block a user