A multi-platform bridge that connects your personal WhatsApp, Telegram, and (optionally) Discord into one place — with full media support, group chat handling, and optional AI auto-replies.
Built as an extended, more feature-complete version of a simple WhatsApp↔Telegram bridge: adds a third platform, real media forwarding (photos, video, voice notes, documents, stickers), and native group chat support instead of DMs only.
- Three platforms, one router. WhatsApp is the "real" chat surface; Telegram is always your admin console; Discord is optional and mirrors every chat into its own channel, so you (or a small team) can also manage things from Discord.
- Full media pipeline. Images, videos, voice notes, regular audio, documents, and stickers are downloaded, cached, and re-uploaded in both directions — not just text.
- Group chats are first-class. WhatsApp group messages are tagged with the sender's name and the group name, and the AI (if enabled) only jumps in when actually @mentioned, so it doesn't spam a busy group.
- Per-chat AI controls, exactly like before: pause/resume, block/unblock, live status, all from inline buttons — but now they also refresh correctly and work identically whether the chat is a WhatsApp DM or a WhatsApp group mirrored into Discord.
- Adapter architecture. Each platform (
src/platforms/<name>/client.js) only has to convert its native messages into a sharedUnifiedMessageshape and implement a couple of send methods. TheRouternever touches Baileys/grammy/discord.js directly, which is what makes adding a 4th platform later a matter of writing one file.
┌────────────┐
WhatsApp ───▶│ │───▶ Telegram (admin console, always on)
(Baileys) │ Router │
│ (core/) │───▶ Discord (optional, per-chat channels)
│ │
└─────┬──────┘
│
SQLite (chats, messages, links)
│
Groq / Llama (optional auto-replies)
src/core/Message.js— the platform-agnosticUnifiedMessageenvelopesrc/core/MediaManager.js— download/cache/prune media files on disksrc/core/Router.js— wires adapters together, dedups, persists, triggers AIsrc/platforms/whatsapp/client.js— Baileys connection, QR/pairing auth, group metadata, media in/outsrc/platforms/telegram/client.js— admin bot: commands, inline controls, reply routing, media in/outsrc/platforms/discord/client.js— per-chat channel creation and mirroring, media in/outsrc/ai/groqClient.js— Groq/Llama completion calls with per-chat memorysrc/database/db.js— SQLite schema and query helpers (better-sqlite3)
- Node.js 20+
- A personal WhatsApp account on a mobile device
- A Telegram bot (via @BotFather) and your numeric Telegram ID (via @userinfobot)
- Optional: a Groq API key from console.groq.com for AI auto-replies
- Optional: a Discord bot + server if you want the third platform
npm install
cp .env.example .envFill in .env — see comments in .env.example for every option.
npm start # production
npm run dev # auto-reload during developmentOn first run, scan the printed QR code with WhatsApp (Settings → Linked Devices → Link a Device), or set WA_PHONE_NUMBER in .env to get an 8-digit pairing code instead. Your session persists in ./auth after that.
/status— connection state for all platforms, AI mode, queue sizes, uptime/ai_on//ai_off— global AI auto-reply toggle/chats— every bridged chat and its AI state/help— command list
Every forwarded message carries buttons:
- Pause AI / Resume AI — per-chat manual takeover
- Block / Unblock — stop AI from ever replying in this chat, even when globally on
- Status — quick AI-state check
- ↩️ Reply here — makes this the active chat for your next plain-text message (in addition to native "reply to this message" support)
Two ways to reply to a specific chat from Telegram:
- Use Telegram's native Reply on the forwarded message.
- Tap ↩️ Reply here once, then just type — no need to reply to every message individually.
Photos, videos, voice messages, and documents you send from Telegram are relayed back to WhatsApp the same way.
Set DISCORD_ENABLED=true and provide a bot token + guild ID. MultiBridge creates one text channel per bridged chat and mirrors messages both ways, including attachments.
WhatsApp group messages show the sender's name and group name in Telegram/Discord. By default (AI_GROUP_MENTION_ONLY=true), the AI only replies in a group when it's actually @mentioned or replied to — set it to false if you want it responding to every message in every group (not recommended for busy groups).
- All outbound sends go through a per-platform rate-limited queue (
src/utils/outboundQueue.js) with retries, to avoid bursts that get WhatsApp accounts flagged. - Media is capped at
MEDIA_MAX_MB(default 64MB) and old cached files are pruned automatically. - Baileys is an unofficial client — using it violates WhatsApp's Terms of Service and can get an account banned if you send at high volume or automate outreach to people who haven't consented. This tool is intended for bridging your own conversations, not bulk messaging.