Welcome to the Telegram Translator Bot Project! π This project includes a set of Telegram bots designed to automate various tasks efficiently, with the main purpose of providing a concise way to consume news from various media sources.
Follow these steps to create and set up your own Telegram bot:
git clone https://github.com/avishaigonen123/TelegramBot.git
cd TelegramBot
python3 -m pip install --user googletrans==4.0.0-rc1
python3 -m pip install --user telethon
config.py
file by copying config_sample.py
and updating your details:
cp config_sample.py config.py
Update config.py
with your API details:
API_ID = <your_api_id>
API_HASH = '<your_api_hash>'
PHONE_NUMBER = '<your_phone_number>'
SOURCE_CHANNEL_ID = <source_channel_id>
DEST_CHANNEL_ID = <destination_channel_id>
create_sessions.py
script to generate session files:
python create_sessions.py
You will receive a secret code on your Telegram application for each session. Enter this code into the program to create a session.
Take the session names printed by the script and add them to bot.py
:
sessions_list = ['your_session_1.session', 'your_session_2.session', 'your_session_3.session']
python bot.py
To get the ID of a channel or user, follow these steps:
Simply copy the ID and use it in your config.py
for the SOURCE_CHANNEL_ID
and DEST_CHANNEL_ID
.
To keep the bot running 24/7, you may deploy it on a cloud server. A free option is webhostmost.com, which provides free hosting services.
To automate script execution, you can use cron jobs. The bot scripts run once per minute, and an additional script for a friend runs every half hour.
Stay updated and get support by joining our Telegram groups:
This project is licensed under the MIT License. Feel free to contribute and improve it!
For any issues or questions, feel free to reach out and open an issue! π¬