Problem
DiscordChannel can send messages and handle slash command interactions via REST API, but cannot receive normal chat messages. The Gateway WebSocket connection is not implemented.
File: Packages/Sources/DiscordChannel/DiscordChannel.swift:55
// Full implementation: connect to Gateway WebSocket for events
What's needed
- Connect to Discord Gateway WebSocket (
wss://gateway.discord.gg)
- Implement heartbeat/identify handshake
- Listen for
MESSAGE_CREATE events
- Route incoming messages through the
onMessage handler
Current state
- ✅ REST API send (
/channels/{id}/messages)
- ✅ Interaction handler (slash commands, buttons)
- ✅ Bot token validation (
/users/@me)
- ❌ Gateway WebSocket connection
- ❌ Normal message receiving
Problem
DiscordChannel can send messages and handle slash command interactions via REST API, but cannot receive normal chat messages. The Gateway WebSocket connection is not implemented.
File:
Packages/Sources/DiscordChannel/DiscordChannel.swift:55What's needed
wss://gateway.discord.gg)MESSAGE_CREATEeventsonMessagehandlerCurrent state
/channels/{id}/messages)/users/@me)