diff --git a/src/core/apis/file.ts b/src/core/apis/file.ts index 6b5893c4..fbcf9d08 100644 --- a/src/core/apis/file.ts +++ b/src/core/apis/file.ts @@ -5,6 +5,7 @@ import { IMAGE_HTTP_HOST_NT, Peer, PicElement, + PicSubType, PicType, RawMessage, SendFileElement, @@ -111,7 +112,7 @@ export class NTQQFileApi { }; } - async createValidSendPicElement(context: MessageContext, picPath: string, summary: string = '', subType: 0 | 1 = 0): Promise { + async createValidSendPicElement(context: MessageContext, picPath: string, summary: string = '', subType: PicSubType = 0): Promise { const { md5, fileName, path, fileSize } = await this.core.apis.FileApi.uploadFile(picPath, ElementType.PIC, subType); if (fileSize === 0) { throw new Error('文件异常,大小为0'); diff --git a/src/core/entities/msg.ts b/src/core/entities/msg.ts index 762256a4..2999e1ca 100644 --- a/src/core/entities/msg.ts +++ b/src/core/entities/msg.ts @@ -104,7 +104,7 @@ export enum NTMsgType { * 图片类型枚举 */ export enum PicType { - NEWPIC_APNG = 2001, + NEWPIC_APNG = 2001, NEWPIC_BMP = 1005, NEWPIC_GIF = 2000, NEWPIC_JPEG = 1000, @@ -117,9 +117,14 @@ export enum PicType { * 图片子类型枚举 */ export enum PicSubType { - Normal = 0, // 普通图片 - Face = 1 // 表情包小图 - //...待补全 其余见NT Android + KNORMAL = 0, + KCUSTOM = 1, + KHOT = 2, + KDIPPERCHART = 3, + KSMART = 4, + KSPACE = 5, + KUNKNOW = 6, + KRELATED = 7 } /** * 消息@类型枚举