Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Member

ts-ignore

ts(2417) 群员(继承User)

Hierarchy

Index

Constructors

Protected constructor

Properties

Protected Readonly c

Readonly gid

gid: number

对方群号

Readonly uid

uid: number

Accessors

card

  • get card(): undefined | string

client

Private dm

  • get dm(): boolean

group

group_id

  • get group_id(): number

info

is_admin

  • get is_admin(): boolean

is_friend

  • get is_friend(): boolean

is_owner

  • get is_owner(): boolean

mute_left

  • get mute_left(): number

Private target

  • get target(): number

title

  • get title(): undefined | string

user_id

  • get user_id(): number

Methods

Protected _preprocess

Protected _sendMsg

  • _sendMsg(proto3: Encodable, brief: string, file?: boolean): Promise<{ message_id: string; rand: number; seq: number; time: any }>
  • Parameters

    • proto3: Encodable
    • brief: string
    • file: boolean = false

    Returns Promise<{ message_id: string; rand: number; seq: number; time: any }>

addFriend

  • addFriend(comment?: string): Promise<boolean>
  • 加为好友

    Parameters

    • comment: string = ""

    Returns Promise<boolean>

addFriendBack

  • addFriendBack(seq: number, remark?: string): Promise<boolean>

asFriend

  • asFriend(strict?: boolean): Friend

asMember

  • asMember(gid: number, strict?: boolean): Member

getAddFriendSetting

  • getAddFriendSetting(): Promise<number>

getAvatarUrl

  • getAvatarUrl(size?: 0 | 100 | 40 | 140): string

getChatHistory

  • getChatHistory(time?: number, cnt?: number): Promise<PrivateMessage[]>

getFileInfo

  • getFileInfo(fid: string): Promise<Omit<FileElem, "type"> & Record<"url", string>>

getFileUrl

  • getFileUrl(fid: string): Promise<string>

getForwardMsg

  • getForwardMsg(resid: string, fileName?: string): Promise<ForwardMessage[]>

getSimpleInfo

  • getSimpleInfo(): Promise<{ age: number; area: string; nickname: string; sex: Gender; user_id: number }>

getVideoUrl

  • getVideoUrl(fid: string, md5: string | Buffer): Promise<string>

kick

  • kick(block?: boolean): Promise<boolean>
  • Parameters

    • block: boolean = false

    Returns Promise<boolean>

makeForwardMsg

    1. 制作一条合并转发消息以备发送(制作一次可以到处发)。
    2. 需要注意的是,好友图片和群图片的内部格式不一样, 对着群制作的转发消息中的图片,发给好友可能会裂图,反过来也一样。
    3. 暂不完全支持套娃转发。

    Parameters

    Returns Promise<XmlElem>

markRead

  • markRead(time?: number): Promise<void>
  • 标记time之前为已读,默认当前时间

    Parameters

    • time: number = ...

    Returns Promise<void>

mute

  • mute(duration?: number): Promise<void>
  • 禁言,默认1800秒

    Parameters

    • duration: number = 1800

    Returns Promise<void>

poke

  • poke(): Promise<boolean>

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>

renew

sendMsg

setAdmin

  • setAdmin(yes?: boolean): Promise<boolean>
  • 设置/取消管理员

    Parameters

    • yes: boolean = true

    Returns Promise<boolean>

setCard

  • setCard(card?: string): Promise<boolean>
  • 修改名片

    Parameters

    • card: string = ""

    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>

setTitle

  • setTitle(title?: string, duration?: number): Promise<boolean>
  • 设置头衔

    Parameters

    • title: string = ""
    • duration: number = -1

    Returns Promise<boolean>

uploadImages

  • uploadImages(imgs: Image[] | ImageElem[]): Promise<PromiseRejectedResult[]>

uploadPtt

uploadVideo

Static as

  • as(gid: number, uid: number, strict: boolean): Member

Generated using TypeDoc