feat: 群文件上传事件

feat: 群文件上传接口
This commit is contained in:
linyuchen
2024-03-15 17:28:32 +08:00
parent 178c32053b
commit ed681b8adf
10 changed files with 86 additions and 10 deletions

View File

@@ -121,7 +121,7 @@ export class SendMsgElementConstructor {
thumb = pathLib.dirname(thumb)
// log("thumb 目录", thumb)
const videoInfo = await getVideoInfo(path);
// log("视频信息", videoInfo)
log("视频信息", videoInfo)
const createThumb = new Promise<string>((resolve, reject) => {
const thumbFileName = `${md5}_0.png`
ffmpeg(filePath)

View File

@@ -48,6 +48,7 @@ export enum NTQQApiClass {
}
export enum NTQQApiMethod {
SET_HEADER = "nodeIKernelProfileService/setHeader",
LIKE_FRIEND = "nodeIKernelProfileLikeService/setBuddyProfileLike",
SELF_INFO = "fetchAuthData",
FRIENDS = "nodeIKernelBuddyService/getBuddyList",
@@ -202,7 +203,12 @@ interface GeneralCallResult {
export class NTQQApi {
// static likeFriend = defineNTQQApi<void>(NTQQApiChannel.IPC_UP_2, NTQQApiClass.NT_API, NTQQApiMethod.LIKE_FRIEND)
static async setHeader(path: string){
return await callNTQQApi<GeneralCallResult>({
methodName: NTQQApiMethod.SET_HEADER,
args: [path]
})
}
static async likeFriend(uid: string, count = 1) {
return await callNTQQApi<GeneralCallResult>({
methodName: NTQQApiMethod.LIKE_FRIEND,
@@ -728,8 +734,9 @@ export class NTQQApi {
})
}
static async call(cmdName: string, args: any[],) {
static async call(className: NTQQApiClass, cmdName: string, args: any[],) {
return await callNTQQApi<GeneralCallResult>({
className,
methodName: cmdName,
args: [
...args,