mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: gif not work
This commit is contained in:
parent
4a09a51722
commit
15fe2837dc
@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
AtType,
|
AtType,
|
||||||
ElementType,
|
ElementType, PicType,
|
||||||
SendFaceElement,
|
SendFaceElement,
|
||||||
SendFileElement,
|
SendFileElement,
|
||||||
SendPicElement,
|
SendPicElement,
|
||||||
@ -9,7 +9,7 @@ import {
|
|||||||
SendTextElement
|
SendTextElement
|
||||||
} from "./types";
|
} from "./types";
|
||||||
import {NTQQApi} from "./ntcall";
|
import {NTQQApi} from "./ntcall";
|
||||||
import {encodeSilk} from "../common/utils";
|
import {encodeSilk, isGIF} from "../common/utils";
|
||||||
import * as fs from "node:fs";
|
import * as fs from "node:fs";
|
||||||
|
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ export class SendMsgElementConstructor {
|
|||||||
fileName: fileName,
|
fileName: fileName,
|
||||||
sourcePath: path,
|
sourcePath: path,
|
||||||
original: true,
|
original: true,
|
||||||
picType: 1001,
|
picType: isGIF(picPath) ? PicType.gif : PicType.jpg,
|
||||||
picSubType: 0,
|
picSubType: 0,
|
||||||
fileUuid: "",
|
fileUuid: "",
|
||||||
fileSubId: "",
|
fileSubId: "",
|
||||||
|
@ -107,6 +107,10 @@ export interface SendPttElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum PicType {
|
||||||
|
gif = 2000,
|
||||||
|
jpg = 1000
|
||||||
|
}
|
||||||
export interface SendPicElement {
|
export interface SendPicElement {
|
||||||
elementType: ElementType.PIC,
|
elementType: ElementType.PIC,
|
||||||
elementId: "",
|
elementId: "",
|
||||||
@ -118,7 +122,7 @@ export interface SendPicElement {
|
|||||||
fileName: string,
|
fileName: string,
|
||||||
sourcePath: string,
|
sourcePath: string,
|
||||||
original: boolean,
|
original: boolean,
|
||||||
picType: number,
|
picType: PicType,
|
||||||
picSubType: number,
|
picSubType: number,
|
||||||
fileUuid: string,
|
fileUuid: string,
|
||||||
fileSubId: string,
|
fileSubId: string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user