Skip to content

IM Adapters

IM Registry Pattern

All IM adapters implement the IMModule interface:

  • reply — Send text response
  • sendProgress — Stream progress updates
  • sendBlocks — Send structured content
  • sendImage / sendFile — Media delivery
  • start / stop — Lifecycle management
  • getCapabilities() — Declare supported features

Adding a New Adapter

registerIM("newplatform", newPlatformFactory);

That’s it. No changes to the Bot constructor needed.

Supported Adapters

AdapterConnectionCapabilities
FeishuWebSocket persistentText, cards, files, images, audio, buttons
TelegramLong pollingText, files, images, audio
WeComWebSocket + QR bindingText, files, images
WeChatHTTP long-poll + QR authText, images, files, voice (AES-128-ECB)