Forward messages that match a specific pattern from multiple Telegram chats to one or more chats
790
Forward messages that match a specific pattern from multiple Telegram chats to one or more chats.
Pull the Docker image from the DockerHub:
docker pull aleg94/telegram-forwarder
Create a Telegram session by getting developer's api id and api hash from here and running the command:
docker run -it --rm aleg94/telegram-forwarder python ./scripts/create_session.py --api-id <api-id> --api-hash <api-hash>
Follow the on-screen instructions and enter your confirmation code and password (if two-factor authentication is enabled).
Run the image in a container providing the following environment variables:
API_ID: the api id associated with your Telegram accountAPI_HASH: the api hash associated with your Telegram accountSESSION: the session obtained in step 2INPUT_CHAT_USERNAMES: comma separated list of chat's usernames that you'd like to forward messages from (must be present on dialogs)OUTPUT_CHAT_USERNAMES: comma separated list of chat's usernames that you'd like to forward messages to (must be present on dialogs)MESSAGE_PATTERN: a regular expression that messages must match to be forwardeddocker run --name telegram_forwarder -d
-e API_ID=<api-id>
-e API_HASH=<api-hash>
-e SESSION=<session>
-e INPUT_CHAT_USERNAMES=<username1>,<username2>
-e OUTPUT_CHAT_USERNAMES=<username3>,<username4>
-e MESSAGE_PATTERN=<regex>
aleg94/telegram-forwarder
Content type
Image
Digest
sha256:32263d9f2…
Size
29.5 MB
Last updated
about 2 years ago
docker pull aleg94/telegram-forwarder