Properties
Protected Optional gid
gid?: number
Methods
Protected _preprocess
Parameters
Returns Promise<Converter>
Protected _sendMsg
- _sendMsg(proto3: Encodable, brief: string, file?: boolean): Promise<{ message_id: string; rand: number; seq: number; time: any }>
Parameters
brief: string
file: boolean = false
Returns Promise<{ message_id: string; rand: number; seq: number; time: any }>
addFriendBack
- addFriendBack(seq: number, remark?: string): Promise<boolean>
Parameters
seq: number
remark: string = ""
Returns Promise<boolean>
asFriend
- asFriend(strict?: boolean): Friend
asMember
- asMember(gid: number, strict?: boolean): Member
Parameters
gid: number
strict: boolean = false
getAddFriendSetting
- getAddFriendSetting(): Promise<number>
getAvatarUrl
- getAvatarUrl(size?: 0 | 100 | 40 | 140): string
Parameters
size: 0 | 100 | 40 | 140 = 0
Returns string
getChatHistory
- getChatHistory(time?: number, cnt?: number): Promise<PrivateMessage[]>
Parameters
time: number = ...
cnt: number = 20
getFileInfo
- getFileInfo(fid: string): Promise<Omit<FileElem, "type"> & Record<"url", string>>
Parameters
Returns Promise<Omit<FileElem, "type"> & Record<"url", string>>
getFileUrl
- getFileUrl(fid: string): Promise<string>
Parameters
Returns Promise<string>
getForwardMsg
- getForwardMsg(resid: string, fileName?: string): Promise<ForwardMessage[]>
Parameters
resid: string
fileName: string = "MultiMsg"
getSimpleInfo
- getSimpleInfo(): Promise<{ age: number; area: string; nickname: string; sex: Gender; user_id: number }>
Returns Promise<{ age: number; area: string; nickname: string; sex: Gender; user_id: number }>
getVideoUrl
- getVideoUrl(fid: string, md5: string | Buffer): Promise<string>
Parameters
fid: string
md5: string | Buffer
Returns Promise<string>
markRead
- markRead(time?: number): Promise<void>
Parameters
Returns Promise<void>
recallMsg
- recallMsg(msg: PrivateMessage): Promise<boolean>
- recallMsg(msgid: string): Promise<boolean>
- recallMsg(seq: number, rand: number, time: number): Promise<boolean>
- recallMsg(param: string | number | PrivateMessage, rand?: number, time?: number): Promise<boolean>
Parameters
Returns Promise<boolean>
Parameters
Returns Promise<boolean>
Parameters
seq: number
rand: number
time: number
Returns Promise<boolean>
Parameters
rand: number = 0
time: number = 0
Returns Promise<boolean>
setFriendReq
- setFriendReq(seq: number, yes?: boolean, remark?: string, block?: boolean): Promise<boolean>
Parameters
seq: number
yes: boolean = true
remark: string = ""
block: boolean = false
Returns Promise<boolean>
setGroupInvite
- setGroupInvite(gid: number, seq: number, yes?: boolean, block?: boolean): Promise<boolean>
Parameters
gid: number
seq: number
yes: boolean = true
block: boolean = false
Returns Promise<boolean>
setGroupReq
- setGroupReq(gid: number, seq: number, yes?: boolean, reason?: string, block?: boolean): Promise<boolean>
Parameters
gid: number
seq: number
yes: boolean = true
reason: string = ""
block: boolean = false
Returns Promise<boolean>
uploadImages
- uploadImages(imgs: Image[] | ImageElem[]): Promise<PromiseRejectedResult[]>
Parameters
Returns Promise<PromiseRejectedResult[]>
对方群号