Constructors
constructor
- new Group(client, group_id): Group
Parameters
- client: Client
- group_id: number
Properties
Readonly
group_id
group_id: number
Accessors
info
- get info(): TGroupInfo
- set info(info): void
Returns void
Methods
GetHonorMembers
- GetHonorMembers(type): Promise<TGroupHonorInfo>
Parameters
- type:
| "talkative"
| "performer"
| "legend"
| "strong_newbie"
| "emotion"
| "all"
GetMessageHistory
- GetMessageHistory(message_seq?): Promise<TSegment[]>
Parameters
Optional
message_seq: number
Returns Promise<TSegment[]>
获取消息类型数组,最大数组长度为 19 。
KickMember
- KickMember(user_id, reject_add_request?): Promise<void>
Parameters
- user_id: number
- reject_add_request: boolean = false
Returns Promise<void>
MuteAll
- MuteAll(enable?): Promise<void>
Returns Promise<void>
MuteAnonymous
- MuteAnonymous(anonymous?, anonymous_flag?, duration?): Promise<void>
Parameters
Optional
anonymous: TAnonymousOptional
anonymous_flag: stringOptional
duration: number
Returns Promise<void>
MuteMember
- MuteMember(user_id, duration?): Promise<void>
Parameters
- user_id: number
- duration: number = 1800
Returns Promise<void>
Quit
- Quit(is_dismiss?): Promise<void>
Parameters
- is_dismiss: boolean = false
Returns Promise<void>
SendForwardMessage
- SendForwardMessage(messages): Promise<{
forward_id: number;
message_id: number;
}> Returns Promise<{
forward_id: number;
message_id: number;
}>
SendMessage
- SendMessage(message, auto_escape?): Promise<number>
Parameters
- message: TElements
- auto_escape: boolean = false
Returns Promise<number>
SetAdmin
- SetAdmin(user_id, enable?): Promise<void>
Parameters
- user_id: number
- enable: boolean = true
Returns Promise<void>
SetMemberCard
- SetMemberCard(user_id, card?): Promise<void>
Parameters
- user_id: number
Optional
card: string
Returns Promise<void>
SetMemberTitle
- SetMemberTitle(user_id, special_title?, duration?): Promise<void>
Parameters
- user_id: number
Optional
special_title: string- duration: number = -1
Returns Promise<void>
SetName
- SetName(group_name): Promise<void>
Returns Promise<void>
UploadFile
- UploadFile(file, name, folder?): Promise<void>
Parameters
- file: string
- name: string
Optional
folder: string
Returns Promise<void>
Static
As
- As(client, group_id): Group
Parameters
- client: Client
- group_id: number
GetHonorMembers (get_group_honor_info) 获取群荣誉信息