Expand description
QQ Official Bot WebSocket gateway protocol types (opcodes, payloads).
The QQ Bot gateway is Discord-like: a WebSocket connection exchanging JSON
GatewayPayload frames keyed by op (opcode). The client identifies,
heartbeats, and receives op=0 dispatch events (C2C_MESSAGE_CREATE,
GROUP_AT_MESSAGE_CREATE, etc.). Message sending is done over HTTP.
Reference: QQ Official Bot API (https://bot.q.qq.com).
Modules§
- event_
type - Dispatch event type strings (the
tfield of anop=0payload). - file_
type - File type constants for the upload API.
- msg_
type - Message type for the send-message HTTP API.
- op
- Gateway opcode values.
Structs§
- Access
Token Request - Request body for the getAppAccessToken endpoint.
- Access
Token Response - Response body for the getAppAccessToken endpoint.
- Author
- Gateway
Payload - Top-level gateway payload, exchanged over the WebSocket connection.
- Hello
Data dpayload of the Hello (op=10) event.- Media
File Info - Media file info for sending media messages (msg_type=7).
- Message
Event - Common fields of an incoming message event (
C2C_MESSAGE_CREATE,GROUP_AT_MESSAGE_CREATE). - QqAttachment
- An attachment in a QQ message event (image, file, etc.).
- Send
Message Request - Request body for POSTing a message to a group or user.
- Send
Message Response - Response body for the send-message HTTP API.
- Upload
Media Request - Request body for uploading a file to QQ.
Uses JSON body (not multipart). Either
url(public URL for QQ to download) orfile_data(base64-encoded binary) must be provided. - Upload
Media Response - Response body for the upload media API.
Constants§
- INTENT_
C2C - Intent for C2C (private) messages.
- INTENT_
GROUP_ AT_ MESSAGE - Intent for group @-mention messages.