fix getGroupsList, getFriendsList

This commit is contained in:
linyuchen
2023-10-26 00:19:10 +08:00
parent cc7d869c84
commit 27a6ddb554

29
src/global.d.ts vendored
View File

@@ -28,13 +28,28 @@ interface MessageElement{
}
}
declare type User = {
avatarUrl: string;
bio: string; // 签名
nickName: string;
uid: string; // 加密的字符串
uin: string; // QQ号
}
declare type Group = {
uid: string; // 群号
name: string;
}
declare var LLAPI: {
on(event: "new-messages", callback: (data: MessageElement[]) => void): void;
getAccountInfo(): {
getAccountInfo(): Promise<{
uid: string // qq
uin: string // 一串加密的字符串
}
getUserInfo(uid: string):{nickName: string};
}>
// uid是一串加密的字符串, 收到群消息的时候可以用此函数获取群成员的qq号
getUserInfo(uid: string): Promise<User>;
sendMessage(peer: Peer, message:
{
type: "text",
@@ -44,10 +59,6 @@ declare var LLAPI: {
file: string,
}
): void
getGroupList(forced: boolean): {
}[]
getFriendList(forced: boolean): {
}[]
getGroupsList(forced: boolean): Promise<Group[]>
getFriendsList(forced: boolean): Promise<User[]>
};