mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
新增设置头像的api,set_qq_avatar
This commit is contained in:
@@ -96,6 +96,8 @@ export enum NTQQApiMethod {
|
||||
CACHE_CHAT_CLEAR = 'nodeIKernelStorageCleanService/clearChatCacheInfo',
|
||||
|
||||
OPEN_EXTRA_WINDOW = 'openExternalWindow',
|
||||
|
||||
SET_QQ_AVATAR = 'nodeIKernelProfileService/setHeader'
|
||||
}
|
||||
|
||||
enum NTQQApiChannel {
|
||||
@@ -894,4 +896,14 @@ export class NTQQApi {
|
||||
}, null]
|
||||
});
|
||||
}
|
||||
|
||||
static async setQQAvatar(filePath: string) {
|
||||
return await callNTQQApi<GeneralCallResult>({
|
||||
methodName: NTQQApiMethod.SET_QQ_AVATAR,
|
||||
args: [{
|
||||
path:filePath
|
||||
}, null],
|
||||
timeoutSecond: 10 // 10秒不一定够
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user