mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
feat: 群头像设置
This commit is contained in:
@@ -7,6 +7,9 @@ import { logDebug } from '@/common/utils/log';
|
||||
// console.log(JSON.stringify(await NTQQGroupApi.getMemberExtInfo(), null, 2));
|
||||
// }, 20000);
|
||||
export class NTQQGroupApi {
|
||||
static async setGroupAvatar(gc:string,filePath: string) {
|
||||
return napCatCore.session.getGroupService().setHeader(gc,filePath);
|
||||
}
|
||||
static async getGroups(forced = false) {
|
||||
let [_retData, _updateType, groupList] = await NTEventDispatch.CallNormalEvent
|
||||
<(force: boolean) => Promise<any>, (updateType: number, groupList: Group[]) => void>
|
||||
|
||||
@@ -46,6 +46,10 @@ export class NTQQUserApi {
|
||||
const ret = await napCatCore.session.getProfileService().setHeader(filePath) as setQQAvatarRet;
|
||||
return { result: ret?.result, errMsg: ret?.errMsg };
|
||||
}
|
||||
static async setGroupAvatar(gc:string,filePath: string) {
|
||||
const ret = await napCatCore.session.getGroupService().setHeader(gc,filePath);
|
||||
return { result: ret?.result, errMsg: ret?.errMsg };
|
||||
}
|
||||
|
||||
static async getSelfInfo() {
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
import { GeneralCallResult } from '@/core/services/common';
|
||||
|
||||
export interface NodeIKernelGroupService {
|
||||
setHeader(uid:string,path:string): unknown;
|
||||
|
||||
addKernelGroupListener(listener: NodeIKernelGroupListener): number;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user