mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix getGroupsList, getFriendsList
This commit is contained in:
29
src/global.d.ts
vendored
29
src/global.d.ts
vendored
@@ -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: {
|
declare var LLAPI: {
|
||||||
on(event: "new-messages", callback: (data: MessageElement[]) => void): void;
|
on(event: "new-messages", callback: (data: MessageElement[]) => void): void;
|
||||||
getAccountInfo(): {
|
getAccountInfo(): Promise<{
|
||||||
uid: string // qq
|
uid: string // qq
|
||||||
uin: string // 一串加密的字符串
|
uin: string // 一串加密的字符串
|
||||||
}
|
}>
|
||||||
getUserInfo(uid: string):{nickName: string};
|
|
||||||
|
// uid是一串加密的字符串, 收到群消息的时候,可以用此函数获取群成员的qq号
|
||||||
|
getUserInfo(uid: string): Promise<User>;
|
||||||
sendMessage(peer: Peer, message:
|
sendMessage(peer: Peer, message:
|
||||||
{
|
{
|
||||||
type: "text",
|
type: "text",
|
||||||
@@ -44,10 +59,6 @@ declare var LLAPI: {
|
|||||||
file: string,
|
file: string,
|
||||||
}
|
}
|
||||||
): void
|
): void
|
||||||
getGroupList(forced: boolean): {
|
getGroupsList(forced: boolean): Promise<Group[]>
|
||||||
|
getFriendsList(forced: boolean): Promise<User[]>
|
||||||
}[]
|
|
||||||
getFriendList(forced: boolean): {
|
|
||||||
|
|
||||||
}[]
|
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user