Skip to content

This document was written by AI and has been manually reviewed.

Drivers Overview

A driver is the adapter between NextBridge and a specific chat platform. Each driver handles receiving messages from its platform and sending messages to it.

Supported platforms

PlatformDriverReceiveSendNotes
Tencent QQQQSupports multiple protocol backends (NapCat, Lagrange, OneBot v11)
DiscordDiscordReceive via bot gateway; send via webhook or bot
TelegramTelegramUses long polling
Feishu / LarkFeishuWebhook receive; IM API send
DingTalkDingTalkWebhook receive; Robot API send
Yunhu (云湖)YunhuWebhook receive; open API send
KOOK (开黑啦)KOOKWebSocket receive; bot API send; uploads to KOOK CDN
VoceChatVoceChat
MatrixMatrixClient sync loop; E2E encryption supported when enable_e2e is enabled
SignalSignalRequires signal-cli REST API
Microsoft TeamsTeamsBot Framework connector
Google ChatGoogle ChatREST API with service account
SlackSlackSocket Mode or Events API receive; bot or webhook send
MattermostMattermostWebSocket receive; REST API send
Rocket.ChatRocket.ChatOutgoing webhook receive; REST API or incoming webhook send
WebhookWebhookSend-only generic HTTP webhook
WhatsAppWhatsAppUses neonize (go-whatsapp bindings); no Node.js required

How drivers work

Every driver:

  1. Registers a sender with the bridge on startup so the bridge can call it to deliver messages.
  2. Listens for incoming messages (WebSocket, long-polling, or HTTP webhook).
  3. Normalizes each incoming message into a NormalizedMessage and passes it to the bridge.
  4. Sends formatted text and attachments when the bridge calls its sender.

Media handling

All drivers share a common media-download utility. When a message with attachments arrives, the bridge passes the attachment list to the target driver's send() method. Each driver downloads the file (up to max_file_size bytes) and re-uploads it using the target platform's native API.

If a file exceeds the size limit or the download fails, a text fallback is appended to the message:

[Image: photo.jpg](https://example.com/photo.jpg)