Skip to content

0xtbug/Wagram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wagram


A bidirectional bridge that relays messages between Telegram and WhatsApp - including text, images, videos, audio, documents, and stickers.

Built with Go using whatsmeow for WhatsApp and gotgbot for Telegram.

Screenshot

From telegram -> whatsapp

From whatsapp -> telegram

Media Support

Media Type WA → TG TG → WA Format
Image JPEG, PNG
Video MP4
Audio OGG, voice notes
Document Any file (PDF, ZIP, etc.)
Sticker WebP
Caption Text attached to media

Getting Started

Prerequisites

  • Go 1.25+
  • A Telegram Bot Token from @BotFather
  • A WhatsApp account to link via QR code

Installation

git clone https://github.com/0xtbug/Wagram.git
cd Wagram
go mod download

Configuration

Set the following environment variables:

Variable Required Default Description
TELEGRAM_BOT_TOKEN Yes Telegram Bot API token
WAGRAM_DB_PATH No wagram.db SQLite file for chat mappings
WA_SESSION_DB_PATH No wa_session.db SQLite file for WhatsApp session

Run

# Make .env file
# Add environment variables to .env file
TELEGRAM_BOT_TOKEN="your-token-here"
WAGRAM_DB_PATH="wagram.db"
WA_SESSION_DB_PATH="wa_session.db"

# Or export environment variables
export TELEGRAM_BOT_TOKEN="your-token-here"
export WAGRAM_DB_PATH="wagram.db"
export WA_SESSION_DB_PATH="wa_session.db"

# Start wagram
go run ./cmd/wagram

Build

go build ./cmd/wagram

Bot Commands

Command Description
/start Show welcome message with all available commands
/scan Generate WhatsApp QR code for login
/status Check WhatsApp connection and authentication state
/bridge Link a WhatsApp chat to the current Telegram chat
/unbridge Remove the link for the current Telegram chat
/list Show all active WA ↔ TG chat mappings

Docs

How to use

Tech Stack

Component Library
WhatsApp whatsmeow
Telegram gotgbot
Database SQLite via go-sqlite
QR Code go-qrcode

Running Tests

go test ./test/... -v

About

A bidirectional bridge that relays messages between Telegram and WhatsApp - including text, images, videos, audio, documents, and stickers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages