fix: typo

This commit is contained in:
手瓜一十雪
2024-11-22 22:04:57 +08:00
parent 4277cb3f3c
commit 90b54435b5
4 changed files with 20 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ import {
} from "@/core/packet/transformer/proto";
import {
BaseEmojiType,
FaceType,
NTMsgAtType,
PicType,
SendArkElement,
@@ -163,7 +164,7 @@ export class PacketMsgFaceElement extends IPacketMsgElement<SendFaceElement> {
constructor(element: SendFaceElement) {
super(element);
this.faceId = element.faceElement.faceIndex;
this.isLargeFace = element.faceElement.faceType === BaseEmojiType.CHAIN_SUPER_EMOJI;
this.isLargeFace = element.faceElement.faceType === FaceType.AniSticke;
}
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {

View File

@@ -1,5 +1,4 @@
import { BaseEmojiType } from "./emoji";
import { ElementType, MessageElement, NTGrayTipElementSubTypeV2, PicSubType, PicType, TipAioOpGrayTipElement, TipGroupElement, NTVideoType } from "./msg";
import { ElementType, MessageElement, NTGrayTipElementSubTypeV2, PicSubType, PicType, TipAioOpGrayTipElement, TipGroupElement, NTVideoType, FaceType } from "./msg";
type ElementFullBase = Omit<MessageElement, 'elementType' | 'elementId' | 'extBufForUI'>;
@@ -31,7 +30,7 @@ export interface TextElement {
export interface FaceElement {
faceIndex: number;
faceType: BaseEmojiType;
faceType: FaceType;
faceText?: string;
packId?: string;
stickerId?: string;
@@ -254,7 +253,7 @@ export interface FaceBubbleElement {
faceFlag: number;
content: string;
oldVersionStr: string;
faceType: BaseEmojiType;
faceType: FaceType;
others: string;
yellowFaceInfo: {
index: number;

View File

@@ -526,4 +526,16 @@ export interface MsgReqType {
includeSelf: boolean,
includeDeleteMsg: boolean,
extraCnt: number
}
/**
* 表情类型枚举
*/
export enum FaceType {
Unknown = 0,
OldFace = 1, // 老表情
Normal = 2, // 常规表情
AniSticke = 3, // 动画贴纸
Lottie = 4,// 新格式表情
Poke = 5 // 可变Poke
}

View File

@@ -16,6 +16,7 @@ import {
SendMessageElement,
SendTextElement,
BaseEmojiType,
FaceType,
} from '@/core';
import faceConfig from '@/core/external/face_config.json';
import { NapCatOneBot11Adapter, OB11Message, OB11MessageData, OB11MessageDataType, OB11MessageFileBase, } from '@/onebot';
@@ -547,7 +548,7 @@ export class OneBotMsgApi {
elementId: '',
faceElement: {
faceIndex: FaceIndex.DICE,
faceType: BaseEmojiType.CHAIN_SUPER_EMOJI,
faceType: FaceType.AniSticke,
faceText: '[骰子]',
packId: '1',
stickerId: '33',
@@ -564,7 +565,7 @@ export class OneBotMsgApi {
faceElement: {
faceIndex: FaceIndex.RPS,
faceText: '[包剪锤]',
faceType: BaseEmojiType.CHAIN_SUPER_EMOJI,
faceType: FaceType.AniSticke,
packId: '1',
stickerId: '34',
sourceType: 1,