mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
feat: 群文件上传事件
feat: 群文件上传接口
This commit is contained in:
@@ -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)
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user