{"id":13989084,"url":"https://github.com/viperadnan-git/telegram-message-forwarder-bot","last_synced_at":"2026-02-05T17:08:35.065Z","repository":{"id":38402746,"uuid":"354218658","full_name":"viperadnan-git/telegram-message-forwarder-bot","owner":"viperadnan-git","description":"A telegram bot to forward messages automatically when they arrived.","archived":false,"fork":false,"pushed_at":"2024-08-31T07:41:09.000Z","size":32,"stargazers_count":367,"open_issues_count":10,"forks_count":467,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-07-22T10:48:02.607Z","etag":null,"topics":["telegram","telegram-bot","telegram-forward-bot","telegram-forwarder","telegram-message-forwarder","telegram-message-sender","telegram-sender"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viperadnan-git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-03T06:31:08.000Z","updated_at":"2025-07-22T08:36:11.000Z","dependencies_parsed_at":"2023-01-19T15:22:33.352Z","dependency_job_id":"4d367029-ce2b-4927-8c31-241dcfccb288","html_url":"https://github.com/viperadnan-git/telegram-message-forwarder-bot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/viperadnan-git/telegram-message-forwarder-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperadnan-git%2Ftelegram-message-forwarder-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperadnan-git%2Ftelegram-message-forwarder-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperadnan-git%2Ftelegram-message-forwarder-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperadnan-git%2Ftelegram-message-forwarder-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viperadnan-git","download_url":"https://codeload.github.com/viperadnan-git/telegram-message-forwarder-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperadnan-git%2Ftelegram-message-forwarder-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29126213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T14:05:12.718Z","status":"ssl_error","status_checked_at":"2026-02-05T14:03:53.078Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["telegram","telegram-bot","telegram-forward-bot","telegram-forwarder","telegram-message-forwarder","telegram-message-sender","telegram-sender"],"created_at":"2024-08-09T13:01:30.822Z","updated_at":"2026-02-05T17:08:35.042Z","avatar_url":"https://github.com/viperadnan-git.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Telegram Message Forwarder Bot\nA telegram bot, which can forward messages from channel, group or chat to another channel, group or chat automatically.\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/viperadnan-git/telegram-message-forwarder-bot/)\n\n## Configuration\nTo configure this bot you have to use the file template at [`sample.config.toml`](./sample.config.toml). Rename it to `config.toml` and fill the values as described below.\nIf you want to pass the values as environment variables, then pass the content of the config.toml file as environment variable `CONFIG`.\n\n#### Pyrogram Section\n- `api_id` - Your Telegram API ID.\n- `api_hash` - Your Telegram API Hash.\n- `session_string` - (Optional if `bot_token` is provided) Session string of your Telegram account. You can get it by running [`get_session.py`](./get_session.py) file.\n- `bot_token` - (Optional if `session_string` is provided) Bot token of your Telegram bot. You can get it by creating a bot using [BotFather](https://t.me/BotFather).\n- `sudo_users` - (Optional) List of user ids of users who can use the bot. You can get your user id by sending `/id` command to [Rose](https://t.me/MissRose_bot).\n\n```toml\n[pyrogram]\napi_id = 12345                                                      # required\napi_hash = \"0123456789abcdef0123456789abcdef\"                       # required\nbot_token = \"123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ\"                  # either bot_token or session_string is required\nsession_string = \"1BVn1-ABCD1234efgh5678IJKLmnoPQRsTUVwxyZxxxxxxxx\" # either bot_token or session_string is required\nsudo_users = [123456789, 123456789]                                 # optional\n```\n\n#### Chats Section\n- `from` - Chat id of the chat from which messages will be forwarded. You can get it by sending `/id` command to [Rose](https://t.me/MissRose_bot).\n- `to` - Chat id of the chat to which messages will be forwarded. You can get it by sending `/id` command to [Rose](https://t.me/MissRose_bot).\n- `replace` - (Optional) A dictionary of strings to replace in the message. The key is the string to be replaced and the value is the string to replace with. This is optional.\n\nYou can add multiple chats by using the following format.\n```toml\n[[chats]]\nfrom = -100123456789        # required\nto = 123456789              # required\nreplace = { \"old\" = \"new\" } # optional\n\n[[chats]]\nfrom = [123456789, -100123456789]               # required\nto = 123456789                                  # required\nreplace = { \"only_apply_to_this_chat\" = \"new\" } # optional\n\n[[chats]]\nfrom = -100123456789            # required\nto = [123456789, -100123456789] # required\n```\n\nNote: The chats should be in the format of `int` or `list` of `int`. If you want to use usernames, then you have to use the `chat_id` of the chat. You can get it by sending `/id` command to [Rose](https://t.me/MissRose_bot).\n\n\n### Note\n- Supported identifier for a chat should be the chat id.\n- Use `/forward` command to forward older messages. For message older than 2 days you have to login as a user and set the `session_string` variable in pyrogram section. Command usage - `/forward \u003cChat ID/Username/Message Link\u003e \u003cLimit, No. of Messages to forward\u003e \u003cID of the last message of from chat to avoid repetition\u003e`\n\n## Deployment\n\n### Clone the repository\n```bash\ngit clone \u003crepo-url\u003e telegram-message-forwarder-bot\ncd telegram-message-forwarder-bot\n```\n\n### Install the requirements\nInstall the required Python Modules in your machine.\n```bash\npip3 install -r requirements.txt\n```\n\n### Start the bot\nWith python3.10 or later.\n```bash\npython3 -m bot\n```\n\n### Docker\nBuild the image.\n```bash\ndocker build -t telegram-message-forwarder-bot .\n```\n\nRun the container.\n```bash\ndocker run -d --name telegram-message-forwarder-bot telegram-message-forwarder-bot\n```\n\n## Contributing\n- Fork the repository.\n- Create a new branch.\n- Make your changes.\n- Commit and push the changes to your fork.\n- Create a pull request.\n\n## Support\n- Ask in the [Telegram Group](https://t.me/ViperCommunity) or open an issue.\n\n### Copyright \u0026 License\n- Copyright \u0026copy; 2021 \u0026mdash; [Adnan Ahmad](https://github.com/viperadnan-git)\n- Licensed under the terms of the [GNU General Public License Version 3 \u0026dash; 29 June 2007](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviperadnan-git%2Ftelegram-message-forwarder-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviperadnan-git%2Ftelegram-message-forwarder-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviperadnan-git%2Ftelegram-message-forwarder-bot/lists"}