This Next.js application serves as a bot that mirrors messages from a Telegram channel to a Discord channel using webhooks.
This Application is still under development. Please be patient for daily updates.
- Overview
- Features
- Prerequisites
- Getting Started
- Environmental variables
- Technoligies Used
- Contributing
- Developers
- Support / Issues
- Buy Me a Coffee
A Next.js app uses server-side rendering to power a bot connecting Telegram and Discord. It fetches Telegram messages via API (Long Pooling Method), forwards them to Discord using webhooks, ensuring real-time sync. Seamless platform interaction without switching.
Additionally, the app features a web UI with a live dashboard for monitoring message flow and settings configuration for managing bot preferences and integrations.
- Live Dashboard & Monitoring
- Built-in logging with Next.js API
- 24-hour message backup on errors
- Efficient webhook integration
- Server-Side Rendering for reliable performance
- Telegram Bot Token
- Discord webhook URL
- Telegram Channel ID
- Telegram & Discord channel
- server for continuous monitoring. Low budget hosting setup. Contact query@shadowctrl.me
To deploy and run the Telegram to Discord Message Mirror Bot locally or on your server:
-
Clone the repository:
git clone https://github.com/shadowctrl/Telegram-Discord-Bot cd telegram-to-discord-bot
-
Install Dependencies:
yarn install or npm install
-
Configure up environment variables: edit .env.local in parent directory with approrpriate values. set NEXT_PUBLIC_Base_Url to your next application url. If not sure leave it as it is
Telegram_Token=1274727484:AHBDFHSDFH-SDFJBSDHJF-SDHBBS NEXT_PUBLIC_Base_Url=http://localhost:3000
-
Start the Application
yarn dev or npm run dev
-
Open https://localhost:3000/settings in your browser
-
Paste telegram channel ID without #.
- Example: https://web.telegram.org/a/#-1002162160712. My Channel ID is "-1002162160712".
-
Create a Discord webhook in your server and Paste the URL.
- Example of Webhook URL: https://discord.com/api/webhooks/1423567663/dfjghuisdjghiasdghfysdgyfh
-
save the settings.
- Go with your First message in telegram channel which should appear automaically in Discord channel via webhook. For any issues (click here] to get support.
To run this project, you will need to add the following environment variables to your .env file. Please refer Step 3 in Getting Started
Telegram ID
Discord Webhook URL
- Next.js - React framework with server-side rendering.
- Telegram API - API for interacting with Telegram bots and channels.
- Discord Webhooks - Webhooks for sending messages to Discord channels.
Contributions are always welcome!
- Make a pull request
For support, raise a issue here or email admin@shadowctrl.me.