A lightweight Telegram Userbot script built with Python and Pyrogram. This script allows you to send automated, sequential messages or create a "lyric prank" typing effect by rapidly editing a single message. It supports direct messages, public groups, and private groups with Topics (Forums).
- Typing Effect: Edits a single message sequentially to display new lines of text.
- Topic Support: Automatically detects and supports Telegram Group Topics (e.g.,
-100123456789_5). - Auto-Cache Update: Retrieves the latest dialogs upon running to prevent
ID not founderrors for private groups. - Safe Delays: Implements
asyncio.sleep()to help prevent Telegram API rate limits andFloodWaiterrors.
- Python 3.7 or higher
- A Telegram account
-
Clone the repository:
git clone https://github.com/MR-Xo/TeleGhost cd TeleGhost -
Install the required library:
pip install pyrogram
-
Get your Telegram API credentials:
- Go to my.telegram.org and log in.
- Go to API development tools and create a new application.
- Copy your
API_IDandAPI_HASH.
-
Configure the script: Open the Python script and replace the placeholders with your credentials:
API_ID = 12345678 # Replace with your API_ID (Integer) API_HASH = "your_api_hash_here" # Replace with your API_HASH (String)
Run the script from your terminal:
python script_name.pyThe script will prompt you to insert the target ID:
- For users/public groups: Enter the username (e.g.,
username). - For private groups: Enter the chat ID (e.g.,
-100123456789). - For group topics: Enter the chat ID followed by an underscore and the topic ID (e.g.,
-100123456789_5).
Note: On the first run, Pyrogram will ask for your phone number and login code to create a .session file locally.
- Do NOT upload your
.sessionfile or your API keys to GitHub. - Rate Limits: Modifying messages too quickly can trigger Telegram's Anti-Spam algorithms, resulting in a temporary ban (
FloodWait). The script uses a 1.2-second delay by default, but use it at your own risk. This project is for educational purposes only.