Optional retryConfig: Partial<RetryConfig>Initialize the adapter with auth credentials. If already connected this will shut down the existing connection first (idempotent).
Get the current connection status and metadata.
Send a message to a conversation on the external platform.
Platform-native conversation/chat ID.
Message content to send.
The platform-assigned message ID.
Register an event handler. Returns an unsubscribe function.
Optional eventTypes: ChannelEventType[]Protected emitEmit an event to all matching subscribers. Subclasses call this when the platform SDK receives an inbound event.
Protected emitConvenience helper: emit a connection_change event with the current
status. Called automatically by setStatus.
Protected hasCheck whether this adapter declares a specific capability.
Protected setTransition to a new connection status and emit an event.
Optional error: stringProtected doEstablish the platform connection using the supplied credentials.
Called by initialize after state has been set to connecting.
Must throw on failure — the base class handles retry and state changes.
Protected doDeliver a message to the external platform.
Called by sendMessage only when the adapter is connected.
Protected doRelease platform resources (close WebSocket, stop polling, etc.).
Called by shutdown before the state transitions to disconnected.
Submit a new post to a subreddit.
Protected statusProtected connectedProtected errorProtected platformProtected authStored auth config so reconnect() can re-use it.
Protected Readonly retryReadonly platformPlatform this adapter serves.
Readonly displayHuman-readable display name (e.g., "WhatsApp Business").
Readonly capabilitiesDeclared capabilities of this adapter.
Channel adapter for Reddit.
Uses the
snoowrappackage via dynamic import so the dependency is optional. Falls back to rawfetchagainst the Reddit OAuth2 API if snoowrap is unavailable.Capabilities:
text,rich_text,images,video,reactions,threads,group_chat,hashtags,polls.Conversation ID mapping:
r/<subreddit>orpost:<thing_id>comment:<thing_id>dm:<username>