Skip to content

jz-software/telegram-forwarder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Forwarder

Telegram-Forwarder is a Telegram bot used to redirect messages from various chats, channels, and groups to your own ones. It's main goal is to be simple in installation and usage.

Installation

Clone the repository

git clone https://github.com/jz-software/telegram-forwarder.git

NodeJs packages installation

npm install

Python packages installation

pip install -r requirements.txt

Env variables

Create an .env file with the following content

TOKEN= # Can be obtained from @BotFather on Telegram
DATABASE_URL= # A PostgreSQL database URL, you can install it locally
API_ID= # Can be obtained here: https://my.telegram.org/
API_HASH= # Can be obtained here: https://my.telegram.org/

API_ID and API_HASH can be found here. TOKEN here.

Usage

Authentication

First of all you need to authenticate yourself, you can do this by writing /auth to the bot. alt text

Adding new redirects

You can add new redirects with the /add command.

Just follow the instructions and it will create a redirect for you. It uses your real chats and thus makes creation much easier.

alt text

If you're more experienced you can create redirects directly with one command.

/add title origin destination

title: A title for the redirect

origin: The id of the chat to forward from

destination: The id of the chat to forward to

alt text

FAQ

Q: In what type of chats does it work?

A: It works in all type of chats, it can be a channel, group or even a private chat.

Q: Does it give any reference to the original author of the message?

A: No, it's sent as if it was written by you.

Q: Do I have to authenticate every time it launches?

A: No, it keeps a session in the database so you don't need to authenticate every time.