Class GroupMessage

Hierarchy

Constructors

Properties

anonymous: null | Anonymous
atall: boolean
atme: boolean
block: boolean
cqCode: string
div: number
font: string
group_id: number
group_name: string
index: number
message: MessageElem[]

消息元素数组

message_id: string = ""
message_type: "group" = ...
pktnum: number
post_type: "message" = ...
rand: number

消息随机数

raw_message: string

字符串形式的消息

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: number

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

source?: Quotable

引用回复

sub_type: "normal" | "anonymous"
time: number

消息时间

user_id: number

Methods

  • Type Parameters

    Type Parameters

    • T extends keyof MessageEventMap

    Parameters

    • this: Client
    • type: T
    • message: Record<string, any>

    Returns MessageEventMap[T]

Generated using TypeDoc