2025-11-29 13:52:52 +07:00
2025-11-29 13:52:52 +07:00
2024-06-22 17:53:37 +07:00
2025-11-29 17:28:34 +07:00
2024-07-03 21:56:10 +07:00
2024-06-22 18:22:19 +07:00

forward-telegram-message

A Telegram message forwarder that forwards messages from a source chat to a target chat.

This project is implemented in Go using the gotd/td Telegram client library.

Features

  • Forward messages from one Telegram chat to another
  • Automatic reconnection on disconnect
  • Proper error handling and logging
  • Environment variable configuration

Requirements

Installation

  1. Clone the repository:
git clone https://github.com/tiennm99/forward-telegram-message.git
cd forward-telegram-message
  1. Install dependencies:
go mod tidy

Configuration

Create a .env file in the project root with the following content:

TG_PHONE=+1234567890
API_ID=123456789
API_HASH=0123456789abcdef0123456789abcdef
SOURCE_GROUP_ID=-123456789
TARGET_GROUP_ID=-123456789

Replace the values with your Telegram credentials and chat IDs.

Usage

  1. Install dependencies:
go mod tidy
  1. Run the application:
go run .

The application will connect to Telegram and start forwarding messages from the source chat to the target chat.

The Original Python Version

In 2025, I rewrote this project using Go. The original Python version of this project can be found at the feature/python branch.

S
Description
No description provided
Readme Apache-2.0 134 KiB
Languages
Python 100%