Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface GroupMessageEvent

群消息事件

Hierarchy

Index

Properties

anonymous

anonymous: null | Anonymous

atall

atall: boolean

atme

atme: boolean

block

block: boolean

div

div: number

font

font: string

group

group: Group

群对象

group_id

group_id: number

group_name

group_name: string

index

index: number

member

member: Member

发送者群员对象

message

message: MessageElem[]

消息元素数组

message_id

message_id: string = ""
cqhttp

cqhttp方法用

message_type

message_type: "group" = ...

Protected Readonly parsed

parsed: Parser

pktnum

pktnum: number

post_type

post_type: "message" = ...

Protected proto

proto: Proto

rand

rand: number

消息随机数

raw_message

raw_message: string

字符串形式的消息

sender

sender: { age: number; area: string; card: string; level: number; nickname: string; role: GroupRole; sex: Gender; title: string; user_id: number } = ...

Type declaration

  • age: number
  • area: string
  • card: string
  • level: number
  • nickname: string
  • role: GroupRole
  • sex: Gender
  • title: string
  • user_id: number

seq

seq: number

消息编号,在群消息中是唯一的 (私聊消息建议至少使用time,seq,rand中的两个判断唯一性)

Optional source

source?: Quotable

引用回复

sub_type

sub_type: "normal" | "anonymous"

anonymous:匿名 normal:通常

time

time: number

消息时间

user_id

user_id: number

该值永远指向消息发送者。 对于私聊消息,请使用from_idto_id来确定发送者和接收者。 建议使用 sender.user_id

deprecated

未来会改为访问器,仅供内部转发消息时使用。

Accessors

nickname

  • get nickname(): string

Methods

recall

  • recall(): Promise<boolean>

reply

serialize

  • serialize(): Buffer

toCqcode

  • toCqcode(): string

toString

  • toString(): string

Generated using TypeDoc