Compare commits

..

6 Commits

Author SHA1 Message Date
手瓜一十雪
901828f5a6 Merge pull request #724 from clansty/feat/face_resultId
为新的接龙表情提供 resultId 和 chainCount 返回
2025-01-21 22:14:18 +08:00
Clansty
2a4b0cbc09 force resultId to string 2025-01-21 22:10:52 +08:00
Clansty
c5434efd56 为新的接龙表情提供 resultId 和 chainCount 返回 2025-01-21 22:02:35 +08:00
手瓜一十雪
b73f283095 Merge pull request #717 from NapNeko/dependabot/npm_and_yarn/file-type-20.0.0
chore(deps-dev): bump file-type from 19.6.0 to 20.0.0
2025-01-21 21:55:45 +08:00
Mlikiowa
24ef54f01c release: v4.4.1 2025-01-21 13:46:31 +00:00
dependabot[bot]
9c4751794f chore(deps-dev): bump file-type from 19.6.0 to 20.0.0
Bumps [file-type](https://github.com/sindresorhus/file-type) from 19.6.0 to 20.0.0.
- [Release notes](https://github.com/sindresorhus/file-type/releases)
- [Commits](https://github.com/sindresorhus/file-type/compare/v19.6.0...v20.0.0)

---
updated-dependencies:
- dependency-name: file-type
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 08:59:49 +00:00
8 changed files with 24 additions and 14 deletions

View File

@@ -4,7 +4,7 @@
"name": "NapCatQQ",
"slug": "NapCat.Framework",
"description": "高性能的 OneBot 11 协议实现",
"version": "4.4.0",
"version": "4.4.1",
"icon": "./logo.png",
"authors": [
{

View File

@@ -2,7 +2,7 @@
"name": "napcat",
"private": true,
"type": "module",
"version": "4.4.0",
"version": "4.4.1",
"scripts": {
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
@@ -43,7 +43,7 @@
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"fast-xml-parser": "^4.3.6",
"file-type": "^19.0.0",
"file-type": "^20.0.0",
"globals": "^15.12.0",
"image-size": "^1.1.1",
"typescript": "^5.3.3",

View File

@@ -1 +1 @@
export const napCatVersion = '4.4.0';
export const napCatVersion = '4.4.1';

View File

@@ -160,10 +160,12 @@ export class PacketMsgReplyElement extends IPacketMsgElement<SendReplyElement> {
export class PacketMsgFaceElement extends IPacketMsgElement<SendFaceElement> {
faceId: number;
isLargeFace: boolean;
resultId?: string;
constructor(element: SendFaceElement) {
super(element);
this.faceId = element.faceElement.faceIndex;
this.resultId = element.faceElement.resultId;
this.isLargeFace = element.faceElement.faceType === FaceType.AniSticke;
}
@@ -176,10 +178,10 @@ export class PacketMsgFaceElement extends IPacketMsgElement<SendFaceElement> {
aniStickerPackId: "1",
aniStickerId: "8",
faceId: this.faceId,
field4: 1,
field6: "",
sourceType: 1,
resultId: this.resultId,
preview: "",
field9: 1
randomType: 1
}),
businessType: 1
}

View File

@@ -342,11 +342,11 @@ export const QBigFaceExtra = {
AniStickerPackId: ProtoField(1, ScalarType.STRING, true),
AniStickerId: ProtoField(2, ScalarType.STRING, 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),
field6: ProtoField(6, ScalarType.STRING, true),
resultId: ProtoField(6, ScalarType.STRING, true),
preview: ProtoField(7, ScalarType.STRING, true),
field9: ProtoField(9, ScalarType.INT32, true),
randomType: ProtoField(9, ScalarType.INT32, true),
};
export const QSmallFaceExtra = {

View File

@@ -40,6 +40,7 @@ export interface FaceElement {
resultId?: string;
surpriseId?: string;
randomType?: number;
chainCount?: number;
}
export interface GrayTipRovokeElement {
operatorRole: string;
@@ -348,4 +349,4 @@ export type SendShareLocationElement = SendElementBase<ElementType.SHARELOCATION
export type SendMessageElement = SendTextElement | SendPttElement |
SendPicElement | SendReplyElement | SendFaceElement | SendMarketFaceElement | SendFileElement |
SendVideoElement | SendArkElement | SendMarkdownElement | SendShareLocationElement;
SendVideoElement | SendArkElement | SendMarkdownElement | SendShareLocationElement;

View File

@@ -190,7 +190,10 @@ export class OneBotMsgApi {
return {
type: OB11MessageDataType.face,
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;
},
[OB11MessageDataType.face]: async ({ data: { id } }) => {
[OB11MessageDataType.face]: async ({ data: { id, resultId, chainCount } }) => {
const parsedFaceId = +id;
// 从face_config.json中获取表情名称
const sysFaces = faceConfig.sysface;
@@ -491,6 +494,8 @@ export class OneBotMsgApi {
stickerType: face.AniStickerType,
packId: face.AniStickerPackId,
sourceType: 1,
resultId: resultId?.toString(),
chainCount,
},
};
},

View File

@@ -164,6 +164,8 @@ export interface OB11MessageFace {
type: OB11MessageDataType.face;
data: {
id: string;
resultId?: string;
chainCount?: number;
};
}
@@ -276,4 +278,4 @@ export interface OB11PostContext {
message_type?: 'private' | 'group';
user_id?: string;
group_id?: string;
}
}