This is a fully refactored and updated version of the original forwardgram, startingfrom the ground up. It is a fork of the original forwardgram, and is not intended to replace it. The workflow is the same as the original forwardgram, but it is based on multiple threads, one dedicated to the Discord bot and one for Telegram events. So basically it doesn't need to create a new connection for each Telegram event.
For other development or support, please contact me via discord @Aaarghhh
.
Forwardgram Plus (on Steroids) is a free and open source, telegram to discord message bot. It was created starting from the idea of Forwardgram. It enables one to forward messages from Multiple Telegram channels to one (or more) Telegram/Discord channels of your own. This python bot monitors multiple telegram channels. When a new message/entity is sent, it will parse the response and forward it to a discord channel using your own personalized bot. This steroid version support a native translation and presents a label indicating the source of the message.
- Python 3.6+
- Anaconda Python Console (Optional, makes pip install debugging go away)
- Create your own discord bot, add it to your server and retrive token. Follow Steps here.
- Have a Telegram account with valid phone number
- Clone this repository
- Open your choice of console (or Anaconda console) and navigate to cloned folder
- Run Command:
python3 -m pip install -r requirements.txt
. - Fill out a configuration file. An example file can be found at
config.yml-sample
.
- Change the name of
config.yml-sample
toconfig.yml
, setting up the following parameters:
- session_name: "forwardgram"
- telegram_api_id: 123456
- telegram_api_hash: "1234567890abcdef1234567890abcdef"
- the forward settings specifing the input and output channels and its details, follow the comments in the config.yml-sample file
- Add your Telegram
api_id
andapi_hash
to config.yml | Read more here - Add your
discord_bot_token
to config.yml | Read more here - Edit the
config.yam
channel id. Remember when you remove extra discord channels you have to update code indiscord_messager.py
under commentDISCORD SERVER START EVENT
andMESSAGE SCREENER
- No need to edit
ForwardGram.py
unless you want to change the way messages are sent to telegram channels. - Multiple send/recieve telegram channels in
config.yml
can added without any code change.
-
Read the Version History and Changelog and below before running the script.
-
Run the command
python3 forwardgram.py config.yaml
***PLEASE NOTE: In the first time initializing the script, you will be requried to validate your phone number using telegram API. This happens only at the first time (per session name).
- Karan Kapuria
- voidbar
- Sqble
- Aaarghhh
- December 2023 - 0.0.1 Initial Release
- ForwardGram encountered its steroid phase ( Full refactoring ).
This project is licensed under the MIT License - see the LICENSE.md file for details