mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Merge pull request #724 from clansty/feat/face_resultId
为新的接龙表情提供 resultId 和 chainCount 返回
This commit is contained in:
@@ -160,10 +160,12 @@ export class PacketMsgReplyElement extends IPacketMsgElement<SendReplyElement> {
|
|||||||
export class PacketMsgFaceElement extends IPacketMsgElement<SendFaceElement> {
|
export class PacketMsgFaceElement extends IPacketMsgElement<SendFaceElement> {
|
||||||
faceId: number;
|
faceId: number;
|
||||||
isLargeFace: boolean;
|
isLargeFace: boolean;
|
||||||
|
resultId?: string;
|
||||||
|
|
||||||
constructor(element: SendFaceElement) {
|
constructor(element: SendFaceElement) {
|
||||||
super(element);
|
super(element);
|
||||||
this.faceId = element.faceElement.faceIndex;
|
this.faceId = element.faceElement.faceIndex;
|
||||||
|
this.resultId = element.faceElement.resultId;
|
||||||
this.isLargeFace = element.faceElement.faceType === FaceType.AniSticke;
|
this.isLargeFace = element.faceElement.faceType === FaceType.AniSticke;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,10 +178,10 @@ export class PacketMsgFaceElement extends IPacketMsgElement<SendFaceElement> {
|
|||||||
aniStickerPackId: "1",
|
aniStickerPackId: "1",
|
||||||
aniStickerId: "8",
|
aniStickerId: "8",
|
||||||
faceId: this.faceId,
|
faceId: this.faceId,
|
||||||
field4: 1,
|
sourceType: 1,
|
||||||
field6: "",
|
resultId: this.resultId,
|
||||||
preview: "",
|
preview: "",
|
||||||
field9: 1
|
randomType: 1
|
||||||
}),
|
}),
|
||||||
businessType: 1
|
businessType: 1
|
||||||
}
|
}
|
||||||
|
@@ -342,11 +342,11 @@ export const QBigFaceExtra = {
|
|||||||
AniStickerPackId: ProtoField(1, ScalarType.STRING, true),
|
AniStickerPackId: ProtoField(1, ScalarType.STRING, true),
|
||||||
AniStickerId: ProtoField(2, ScalarType.STRING, true),
|
AniStickerId: ProtoField(2, ScalarType.STRING, true),
|
||||||
faceId: ProtoField(3, ScalarType.INT32, true),
|
faceId: ProtoField(3, ScalarType.INT32, true),
|
||||||
Field4: ProtoField(4, ScalarType.INT32, true),
|
sourceType: ProtoField(4, ScalarType.INT32, true),
|
||||||
AniStickerType: ProtoField(5, ScalarType.INT32, true),
|
AniStickerType: ProtoField(5, ScalarType.INT32, true),
|
||||||
field6: ProtoField(6, ScalarType.STRING, true),
|
resultId: ProtoField(6, ScalarType.STRING, true),
|
||||||
preview: ProtoField(7, ScalarType.STRING, true),
|
preview: ProtoField(7, ScalarType.STRING, true),
|
||||||
field9: ProtoField(9, ScalarType.INT32, true),
|
randomType: ProtoField(9, ScalarType.INT32, true),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const QSmallFaceExtra = {
|
export const QSmallFaceExtra = {
|
||||||
|
@@ -40,6 +40,7 @@ export interface FaceElement {
|
|||||||
resultId?: string;
|
resultId?: string;
|
||||||
surpriseId?: string;
|
surpriseId?: string;
|
||||||
randomType?: number;
|
randomType?: number;
|
||||||
|
chainCount?: number;
|
||||||
}
|
}
|
||||||
export interface GrayTipRovokeElement {
|
export interface GrayTipRovokeElement {
|
||||||
operatorRole: string;
|
operatorRole: string;
|
||||||
@@ -348,4 +349,4 @@ export type SendShareLocationElement = SendElementBase<ElementType.SHARELOCATION
|
|||||||
|
|
||||||
export type SendMessageElement = SendTextElement | SendPttElement |
|
export type SendMessageElement = SendTextElement | SendPttElement |
|
||||||
SendPicElement | SendReplyElement | SendFaceElement | SendMarketFaceElement | SendFileElement |
|
SendPicElement | SendReplyElement | SendFaceElement | SendMarketFaceElement | SendFileElement |
|
||||||
SendVideoElement | SendArkElement | SendMarkdownElement | SendShareLocationElement;
|
SendVideoElement | SendArkElement | SendMarkdownElement | SendShareLocationElement;
|
||||||
|
@@ -190,7 +190,10 @@ export class OneBotMsgApi {
|
|||||||
return {
|
return {
|
||||||
type: OB11MessageDataType.face,
|
type: OB11MessageDataType.face,
|
||||||
data: {
|
data: {
|
||||||
id: element.faceIndex.toString()
|
id: element.faceIndex.toString(),
|
||||||
|
raw: element,
|
||||||
|
resultId: element.resultId,
|
||||||
|
chainCount: element.chainCount,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -464,7 +467,7 @@ export class OneBotMsgApi {
|
|||||||
undefined;
|
undefined;
|
||||||
},
|
},
|
||||||
|
|
||||||
[OB11MessageDataType.face]: async ({ data: { id } }) => {
|
[OB11MessageDataType.face]: async ({ data: { id, resultId, chainCount } }) => {
|
||||||
const parsedFaceId = +id;
|
const parsedFaceId = +id;
|
||||||
// 从face_config.json中获取表情名称
|
// 从face_config.json中获取表情名称
|
||||||
const sysFaces = faceConfig.sysface;
|
const sysFaces = faceConfig.sysface;
|
||||||
@@ -491,6 +494,8 @@ export class OneBotMsgApi {
|
|||||||
stickerType: face.AniStickerType,
|
stickerType: face.AniStickerType,
|
||||||
packId: face.AniStickerPackId,
|
packId: face.AniStickerPackId,
|
||||||
sourceType: 1,
|
sourceType: 1,
|
||||||
|
resultId: resultId?.toString(),
|
||||||
|
chainCount,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@@ -164,6 +164,8 @@ export interface OB11MessageFace {
|
|||||||
type: OB11MessageDataType.face;
|
type: OB11MessageDataType.face;
|
||||||
data: {
|
data: {
|
||||||
id: string;
|
id: string;
|
||||||
|
resultId?: string;
|
||||||
|
chainCount?: number;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,4 +278,4 @@ export interface OB11PostContext {
|
|||||||
message_type?: 'private' | 'group';
|
message_type?: 'private' | 'group';
|
||||||
user_id?: string;
|
user_id?: string;
|
||||||
group_id?: string;
|
group_id?: string;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user