This commit is contained in:
linyuchen
2023-10-25 17:34:12 +08:00
parent 5ae95e8263
commit cc7d869c84
14 changed files with 196 additions and 83 deletions

53
src/global.d.ts vendored Normal file
View File

@@ -0,0 +1,53 @@
declare enum AtType {
notAt = 0,
atUser = 2
}
declare type Peer = {
chatType: "private" | "group"
name: string
uid: string // qq号
}
interface MessageElement{
elements:{
type: "text",
content: string,
raw: {
textElement: {
atType: AtType
atUid: string
}
}
}[]
peer: Peer,
sender: {
uid: string // 一串加密的字符串
memberName: string
nickname: string
}
}
declare var LLAPI: {
on(event: "new-messages", callback: (data: MessageElement[]) => void): void;
getAccountInfo(): {
uid: string // qq
uin: string // 一串加密的字符串
}
getUserInfo(uid: string):{nickName: string};
sendMessage(peer: Peer, message:
{
type: "text",
content: string,}|
{
type: "image",
file: string,
}
): void
getGroupList(forced: boolean): {
}[]
getFriendList(forced: boolean): {
}[]
};