source - The chat ID of the chat to forward messages from. It can be a group or a channel.
destination - An array of chat IDs to forward messages to. It can be a group or a channel.
You may add as many objects as you want. The bot will forward messages from all the chats in the source field to all the chats in the destination field. Duplicates are allowed as it already handled by the bot.
What's new
python-telegram-bot
to v20.2Breaking Changes
Configuration
There are two files mandatory for the bot to work
.env
andchat_list.json
..env
Template env may be found in
sample.env
. Rename it to.env
and fill in the values:BOT_TOKEN
- Telegram bot token. You can get it from @BotFatherOWNER_ID
- An integer of consisting of your owner ID.REMOVE_TAG
- set toTrue
if you want to remove the tag ("Forwarded from xxxxx") from the forwarded message.chat_list.json
Template chat_list may be found in
chat_list.sample.json
. Rename it tochat_list.json
.This file contains the list of chats to forward messages from and to. The bot expect it to be an Array of objects with the following structure:
source
- The chat ID of the chat to forward messages from. It can be a group or a channel.destination
- An array of chat IDs to forward messages to. It can be a group or a channel.You may add as many objects as you want. The bot will forward messages from all the chats in the
source
field to all the chats in thedestination
field. Duplicates are allowed as it already handled by the bot.