• Stars
    star
    333
  • Rank 126,599 (Top 3 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A telegram bot to forward messages automatically when they arrived.

Telegram Message Forwarder Bot

A telegram bot, which can forward messages from channel, group or chat to another channel, group or chat automatically.

Deploy

Configuration

To configure this bot add the environment variables stated below. Or add them in config.env.template and change the name to config.env.

  • API_ID - Get it by creating an app on https://my.telegram.org
  • API_HASH - Get it by creating an app on https://my.telegram.org
  • BOT_TOKEN - Get it by creating a bot on https://t.me/BotFather
  • FROM_CHATS - Chat ID of the chats from where to forward messages. Separated by space.
  • TO_CHATS - Chat ID of the chats where to forward messages. Separated by space.
  • TELEGRAM_SESSION - (Optional) If you want to use this bot as user add the telegram session name in environment variables. Get it by running GenString and select the option 1 and follow the instructions.
  • SUDO_USERS - (Optional) Chat identifier of the sudo user. For multiple users use ; as separator.
  • ADVANCE_CONFIG - (Optional) If you want forward message from chat A to chat B and from chat C to chat D add this value in the format given below.
CHAT_ID_A CHAT_ID_B; CHAT_ID_C CHAT_ID_D

Or if you want to forward message from chat A to chat B, C and D. And from Chat E to Chat F

CHAT_ID_A CHAT_ID_B CHAT_ID_C CHAT_ID_D; CHAT_ID_E CHAT_ID_F
     ↑       ^---------------------^         ↑         ↑ to another chat
From channel       To channel        from another channel
  • REMOVE_STRINGS - (Optional) Keywords to remove from message before forwarding. For multiple string use ; as a seperator. For example -
@username;https://t.me/username;Hey! My channel is XXxxXX
  • REPLACE_STRING - (Optional) Keyword to add in the place of REMOVE_STRING

Note

  • Supported identifier for a chat should be the chat id, username or message link.
  • Use /forward command to forward older messages. For message older than 2 days you have to login as a user and set the TELEGRAM_SESSION variable. Command usage - /forward <Chat ID/Username/Message Link> <Limit, No. of Messages to forward> <ID of the last message of from chat to avoid repetition>

Installing Requirements

Install the required Python Modules in your machine.

pip3 install -r requirements.txt

Deployment

With python3.7 or later.

python3 -m bot

Copyright & License

More Repositories

1

google-drive-telegram-bot

A Google Drive Telegram Bot for managing, cloning files, uploading files on Google Drive
Python
623
star
2

force-subscribe-telegram-bot

A Telegram bot to force members to join a specific channel before sending messages in a group.
Python
195
star
3

video-encoder-bot

A Telegram bot to encode videos files via ffmpeg.
Python
102
star
4

rss-feed-telegram-bot

Post Messages to Channels or Groups through RSS Feed.
Python
96
star
5

gdtot-bypasser

A web scraper to convert GDToT links to Google Drive and direct download links
HTML
59
star
6

tiiny

Shorten your long URLs in just a click.
EJS
42
star
7

doodstream-web

An SSR video streaming frontend which uses doodstream.com as a backend.
TypeScript
41
star
8

telegram-forwarder-bot

Forward Telegram messages between chats using pure Telegram Bot API and Webhooks
TypeScript
40
star
9

wallpaper-api

An api which can use different sites to scrape images and serve them through API
HTML
33
star
10

pasting

Publishing tool made in nodejs using deta.
EJS
27
star
11

lemonic-telegram-bot

A telegram bot for searching, streaming and downloading music from various platforms (uses Lemonic API)
TypeScript
17
star
12

telegram-bots

Some useful Telegram Bots
Python
14
star
13

emailer-py

Emailer API built using FastAPI and smtplib
Python
14
star
14

second-password

An authenticator that implements two-step verification service using the Time-base OTP algorithm
HTML
11
star
15

bdsm-typer

Auto typing tool to paste texts on software where pasting text is not allowed. Made for desktop.
Python
5
star
16

gdnan

A Google Drive API wrapper for python3
Python
5
star
17

pyplay

A serverless python playground made via react and skulpt
JavaScript
5
star
18

telegram-filestream

API to stream publically available Telegram files
HTML
4
star
19

SwitchBot

Home automation API using ESP and WebSockets
Python
4
star
20

viperadnan-git.github.io

My personal website just like a portfolio !
HTML
4
star
21

blockdoc

BLockchain based EVault created using Smart Contracts for SIH2023
JavaScript
4
star
22

scoutrss

A library for watching RSS feeds and notifying when new entries are available
Python
2
star
23

sonicbit-python-sdk

An unofficial Python SDK for SonicBit which uses the internal API to interact with the application.
Python
2
star
24

emotion-detection

Python
1
star
25

URL-Shortner

A minimalist URL Shortner written in python3
CSS
1
star
26

meeting-adda

A website for Tea Cafe.
HTML
1
star
27

TJ-Tasks-2022-AdnanAhmad

Blogging website like medium.com for sharing your ideas.
JavaScript
1
star
28

linklair

Maximize online reach. Showcase links, connect with audience. Advanced analytics and integrations.
JavaScript
1
star
29

mongodump-rclone

Backup a MongoDB database using mongodump and upload it to a remote storage using rclone. It is intended to be used as a cron job.
Shell
1
star
30

dotmagic

A Python library for accessing environment variables using dot notation.
Python
1
star