This script is a Telegram bot that forwards messages from specified channels to a target chat upon receiving the forward start command. It stops forwarding messages when the forward stop command is issued.
- Start forwarding messages from selected channels with the
forward startcommand. - Stop forwarding messages with the
forward stopcommand. - Monitor and forward messages from multiple specified Telegram channels.
- Python 3.7 or higher
- Telethon library
Install it using pip:
pip install telethon
- Telegram API credentials Generate API credentials for your Telegram account. You can obtain these credentials by following the instructions at Telegram API Documentation.
- Clone or download this repository.
- Replace the placeholders in the script with your Telegram API credentials:
api_idapi_hash
- Specify the channels to monitor by adding their usernames or IDs to the
monitored_channelslist in the script.
To run the bot:
-
Directly Run in Terminal
python3 your_script_name.py
-
Run in Background Using nohup
nohup python3 your_script_name.py > output.log 2>&1 &
- This command ensures the bot keeps running even if the terminal is closed.
- Logs will be saved in
output.log.
- Start Forwarding: Send
forward startto the bot to enable message forwarding. - Stop Forwarding: Send
forward stopto the bot to disable message forwarding.
- Update the
monitored_channelslist in the script to include the channels you want to monitor.
- Monitored Channels:
@infinityhedge,@shoalresearch,@wublockchainenglish
- Ensure the bot has permission to read messages in the monitored channels.
This script is a Telegram bot that sends scheduled messages to a chat, simulating a live TV presenter style. The bot handles commands to start and stop the schedule.
- Start scheduled message broadcasting with the
show startcommand. - Stop scheduled broadcasting with the
show stopcommand.
- Python 3.7 or higher
- Telethon library
Install it using pip:
pip install telethon
- Telegram API credentials Generate API credentials for your Telegram account. You can obtain these credentials by following the instructions at Telegram API Documentation.
- Clone or download this repository.
- Replace the placeholders in the script with your Telegram API credentials:
api_idapi_hash
- The script automatically handles chats where the
show startcommand is received.
To run the bot:
-
Directly Run in Terminal
python3 your_script_name.py
-
Run in Background Using nohup
nohup python3 your_script_name.py > output.log 2>&1 &
- This command ensures the bot keeps running even if the terminal is closed.
- Logs will be saved in
output.log.
- Start Schedule: Send
show startto the bot to begin scheduled message broadcasting. - Stop Schedule: Send
show stopto the bot to stop the broadcasting.