Content Caster is a versatile userbot designed to schedule and repost messages from one Telegram chat to another. It offers seamless content management across your Telegram channels and groups.
- Message Scheduling: Schedule messages from one chat to be reposted in another chat at specified times.
- Media Handling: Supports text, photos, videos, and documents for scheduled posts.
- Flexible Configuration: Customize start times, intervals, and destination chats for scheduled messages.
- Error Handling: Robust error management to handle interruptions and schedule discrepancies gracefully.
- Python 3.7+: Ensure you have Python installed on your machine. You can download it from python.org.
- Telegram API Credentials: Obtain API credentials (API ID and API HASH) from Telegram's website.
- Session String: Generate a session string using the Session String Creator Userbot.
Clone the repository to your local machine:
git clone https://github.com/xectrone/content-caster-telegram-userbot.git
cd content-caster-telegram-userbot
Install the required Python dependencies using pip:
pip install -r requirements.txt
Create a .env
file in the root directory and add the following environment variables. You can use a text editor to create and edit this file.
API_ID=your_api_id
API_HASH=your_api_hash
SESSION_STRING=your_session_string
- API_ID: Your Telegram API ID.
- API_HASH: Your Telegram API Hash.
- SESSION_STRING: A session string obtained from the Session String Creator Userbot.
To generate a session string, you can use the Session String Creator Userbot. Follow the instructions in its README to generate your session string.
Start the userbot by running:
python main.py
-
/start
- Start the userbot and receive a welcome message. -
/help
- Display available commands and usage instructions. -
/schedule <src_chat_id> <dest_chat_id> <start_message_id> <end_message_id> <start_time (YYYY-MM-DD-HH:MM:SS)> <interval in hrs>
- Schedule messages fromsrc_chat_id
todest_chat_id
starting fromstart_message_id
toend_message_id
at specified intervals.Example:
/schedule 123456789 987654321 1 100 2024-06-30-10:00:00 1
This command schedules messages from message ID 1 to 100 from chat ID
123456789
to chat ID987654321
, starting on June 30, 2024, at 10:00 AM, with a 1-hour interval between messages. -
/info
- Reply to a message to get its message ID and chat ID.
Contributions are welcome! If you have suggestions or want to contribute improvements, please fork the repository and submit a pull request. Feel free to open issues for any bugs or feature requests.
This project is licensed under the MIT License. See the LICENSE file for more details.