- Preparing search index...
- The search index is not available
movo
Constructors
Protected
constructor
- new User(c: Client, uid: number): User
-
Properties
Protected
Readonly
c
Protected
Optional
gid
gid?: number
Readonly
uid
uid: number
Accessors
client
- get client(): Client
-
Private
dm
- get dm(): boolean
-
Returns boolean
Private
target
- get target(): number
-
Returns number
user_id
- get user_id(): number
-
Returns number
Methods
Private
_getRouting
- _getRouting(file?: boolean): Encodable
-
Protected
_preprocess
- _preprocess(content: Sendable, source?: Quotable): Promise<Converter>
-
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>
-
Returns Promise<number>
getAvatarUrl
- getAvatarUrl(size?: 0 | 100 | 140 | 40): string
-
Parameters
-
size: 0 | 100 | 140 | 40 = 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>>
-
Returns Promise<Omit<FileElem, "type"> & Record<"url", string>>
getFileUrl
- getFileUrl(fid: string): Promise<string>
-
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
-
Optional
md5: string | Buffer
Returns Promise<string>
makeForwardMsg
- makeForwardMsg(msglist: Forwardable | Forwardable[], title?: string, desc?: string): Promise<XmlElem>
-
Parameters
-
-
title: string = '转发的聊天记录'
-
desc: string = ''
Returns Promise<XmlElem>
markRead
- markRead(time?: number): Promise<void>
-
Returns Promise<void>
recallMsg
- recallMsg(msg: PrivateMessage): Promise<boolean>
-
Returns Promise<boolean>
- recallMsg(msgid: string): Promise<boolean>
-
Returns Promise<boolean>
- recallMsg(seq: number, rand: number, time: number): Promise<boolean>
-
Parameters
-
seq: number
-
rand: number
-
time: number
Returns Promise<boolean>
- recallMsg(param: string | number | PrivateMessage, rand?: number, time?: number): 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>
thumbUp
- thumbUp(times?: number): Promise<boolean>
-
Returns Promise<boolean>
uploadImages
- uploadImages(imgs: Image[] | ImageElem[]): Promise<PromiseRejectedResult[]>
-
Returns Promise<PromiseRejectedResult[]>
uploadPtt
- uploadPtt(elem: PttElem): Promise<PttElem>
-
Returns Promise<PttElem>
uploadVideo
- uploadVideo(elem: VideoElem): Promise<VideoElem>
-
Static
as
- as(this: Client, uid: number): User
-
对方群号