Back to Airi

EVENT

services/satori-bot/docs/EVENT.md

0.10.13.6 KB
Original Source

JSON Field Documentation

JSON Field Documentation of SatoriEvent

  • Root Level
PathTypeDescription
self_idStringThe unique ID (QQ number) of the bot receiving the event.
platformStringThe platform name (e.g., onebot).
timestampNumberUnix timestamp (ms) when the event was created.
typeStringThe general event category (e.g., message-created).
subtypeStringThe sub-category of the event (e.g., group).
subsubtypeStringFurther classification (e.g., group).
idIntegerInternal sequence ID for the event processing.
snIntegerSerial number for the event.
  • Message Object
PathTypeDescription
messageObjectContainer for standardized message details.
message.message_idStringUnique identifier for this specific message.
message.contentStringThe plain text content of the message.
  • User & Member
PathTypeDescription
userObjectStandardized information about the message sender.
user.idStringUnique ID of the sender.
user.nameStringDisplay name of the sender.
user.avatarStringURL to the sender's avatar image.
memberObjectContext-specific member info (e.g., group membership).
member.nickStringThe user's nickname/card in this specific group .
member.rolesArrayList of roles assigned to the user (e.g., member).
  • Context (Guild/Group)
PathTypeDescription
guildObjectInformation about the guild/group.
guild.idStringUnique ID of the group/guild.
channelObjectInformation about the channel (often same as guild in QQ groups).
channel.typeIntegerChannel type classification.
  • Bot Instance (login)
PathTypeDescription
loginObjectInformation about the bot instance processing this event.
login.userObjectThe bot's own user details (Name, Avatar, ID).
login.statusIntegerConnection status (1 = Online).
login.featuresArrayList of supported API features (e.g., message.create).
login.adapterStringThe adapter protocol being used (onebot).

[Optional] raw data from adapter

e.g. onebot

  • OneBot Data (_data) Raw payload from the OneBot adapter
PathTypeDescription
_data.message_typeStringType of message (e.g., group, private).
_data.sub_typeStringSubtype (e.g., normal, anonymous).
_data.message_idIntegerMessage ID as an integer (OneBot standard).
_data.real_idIntegerThe real message ID from the protocol.
_data.senderObjectSender details specific to OneBot format.
_data.sender.cardStringThe sender's group card/nickname.
_data.raw_messageStringThe unformatted raw string of the message.
_data.messageArrayArray of message segments (Text, Image, Face, etc.).
_data.group_idIntegerThe numeric ID of the group.
_data.group_nameStringThe name of the group.
  • Protocol Raw Data (_data.raw) Internal low-level protocol data (NTQQ/Lagrange)
PathTypeDescription
_data.raw.msgIdStringProtocol-level message ID.
_data.raw.msgSeqStringMessage sequence number.
_data.raw.elementsArrayDetailed rich media elements (text, faces, images).
_data.raw.senderUinStringSender's User Internal Number (QQ).
_data.raw.peerUinStringReceiver/Group User Internal Number.