PLEXICHATNarrative Docs

Opcodes

Guides, route-group overviews, and live schema entry points for the Plexichat backend.

REST http://api.plexichat.com/api/v1Gateway ws://api.plexichat.com/gatewayVersion a.1.0-49

Gateway Opcodes

The backend defines gateway opcodes in src/api/websocket/opcodes.py.

Core Lifecycle Opcodes

ValueNamePurpose
0DISPATCHserver event delivery
1HEARTBEATclient heartbeat
2IDENTIFYauthenticate a new session
3PRESENCE_UPDATEclient presence change
4VOICE_STATE_UPDATEvoice state signaling
6RESUMEresume a prior session
7RECONNECTserver requests reconnect
8REQUEST_GUILD_MEMBERSmember chunk request
9INVALID_SESSIONsession is not resumable as sent
10HELLOheartbeat interval negotiation
11HEARTBEAT_ACKheartbeat acknowledged

Plexichat-Specific Status Opcodes

ValueName
12SERVER_STATUS
13VERSION_CHECK
20VOICE_CONNECT
21VOICE_DISCONNECT
22VOICE_SDP_OFFER
23VOICE_SDP_ANSWER
24VOICE_ICE_CANDIDATE
25VOICE_SPEAKING
26VOICE_QUALITY
30INTERACTION_CREATE
31INTERACTION_RESPONSE
40TYPING_START
41TYPING_STOP

Usage Notes

  • clients primarily send IDENTIFY, HEARTBEAT, RESUME, and optional state-change opcodes
  • servers primarily send HELLO, HEARTBEAT_ACK, RECONNECT, INVALID_SESSION, and DISPATCH
  • server-status, interaction, voice, and typing opcodes are Plexichat-specific extensions beyond the basic lifecycle