vibecoded by gemini
A lightweight, real-time sync bridge that connects a specific Telegram group topic with a Discord channel. It seamlessly mirrors messages, photos, replies, and reactions between both platforms while keeping everything secure.
- Bi-directional Sync: Syncs messages and photos between Discord and Telegram in real-time.
- Smart Reply Mapping: Handles direct replies perfectly on both sides instead of just sending raw text.
- Instant Synchronized Deletion: If a message is deleted on Telegram or Discord, its mirrored copy disappears instantly.
- Built-in Content Filtration: Automatically blocks and replaces dangerous words/patterns (such as CSAM, explicit content, or dangerous keywords) to protect your servers from bans.
- Terminal Control Panel: Manage the bridge directly from your terminal console using
tg <msg>ords <msg>commands.
- Clone this repository:
git clone https://github.com/xDeadForMeLife/dstgbridge.git
cd tg-ds-topic-bridge
- Install the required dependencies:
pip install -r requirements.txt
# --- CONFIGURATION ---
DISCORD_TOKEN = "YOUR_DISCORD_BOT_TOKEN"
DISCORD_CHANNEL_ID = 123456789012345678 # Target Discord channel ID
TG_BOT_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN"
TG_API_ID = 1234567 # Obtain from my.telegram.org
TG_API_HASH = "YOUR_TELEGRAM_API_HASH" # Obtain from my.telegram.org
TG_CHAT_ID = -1001234567890 # Supergroup chat ID (must keep -100 prefix)
TG_TOPIC_ID = 1 # Specific topic/thread ID inside the group
# ---------------------
Your Discord Bot must have "Manage Messages" permissions in the target channel.
Run the script using Python:
python bridge.py
Once the bridge is active, you can type commands directly into the terminal console:
tg — Sends a custom message directly to the Telegram topic.
ds — Sends a custom message directly to the Discord channel.
exit — Safely shuts down both bot clients and closes the script.
This project is licensed under the MIT License.
0 comments
log in to comment.