This is a simple python script that forwards telegram messages to a specified channel in Discord.
The easiest way to run this script on a server is using Docker.
- Copy the
docker-compose.yml
file to your server - Edit the environment variables in the
docker-compose.yml
file, or create a.env
file with the same variables and set theenv_file
variable in thedocker-compose.yml
file to the path of the.env
file - Run
docker-compose up -d
- The script will run in the background and will forward messages to the Discord channel specified in the
DISCORD_CHANNEL_ID
environment variable. - Happy forwarding!
- Go to https://my.telegram.org/apps
- Create a new app
- Save the api_id and api_hash
- Go to Telegram.tools
- Make sure environment is set to Production
- Make sure Account Type is set to Bot.
- Fill the api_id and api_hash you stored
- Fill in the phone number of the account that's linked to the Jotihunt bot
- Generate the session string and save it
- Go to the Discord Developer Portal
- Create a new application
- Go to the bot tab
- Click on "Reset Token"
- Save the token
- Go to the OAuth2 tab
- Click on "Add redirect" and enter any URL, save changes
- Select scopes "bot" and "identify" in the URL generator
- Pick your previously created redirect URL
- Select needed permissions for the bot (at least "Send Messages", but "Administrator" will definitely work)
- Open the URL in a browser and add the bot to your server
- Go to the Discord channel you want to forward messages to
- Right click on the channel name and select "Copy ID" (might need Developer mode)