mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: PicSubType
This commit is contained in:
parent
2bf8d8f791
commit
eeef5409dc
@ -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<SendPicElement> {
|
||||
async createValidSendPicElement(context: MessageContext, picPath: string, summary: string = '', subType: PicSubType = 0): Promise<SendPicElement> {
|
||||
const { md5, fileName, path, fileSize } = await this.core.apis.FileApi.uploadFile(picPath, ElementType.PIC, subType);
|
||||
if (fileSize === 0) {
|
||||
throw new Error('文件异常,大小为0');
|
||||
|
@ -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
|
||||
}
|
||||
/**
|
||||
* 消息@类型枚举
|
||||
|
Loading…
x
Reference in New Issue
Block a user