This project enables anonymous messaging between Telegram users by leveraging a Python-based worker and a D1 database. The bot allows users to send and receive messages without revealing their identities.
- ✅ Anonymous messaging between Telegram users
- ✅ Secure user management via D1 database
- ✅ Inline keyboard for message replies
- ✅ Webhook-based real-time message processing
- ✅ Encryption for data security
Clone the project to your local machine:
git clone https://github.com/Soren2007/telegram-anonymous-chatbot.git
cd telegram-anonymous-chatbot
Ensure your environment supports Python execution.
Create a database and bind it to your worker:
CREATE TABLE users (
"id" INTEGER PRIMARY KEY,
"telegram_user_id" TEXT,
"rkey" TEXT,
"target_user" TEXT
);
Open the worker in a browser and visit:
https://yourworker.username.workers.dev/init
Modify the following variables in main.py
with your bot credentials:
BOT_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN"
BOT_ID = "YOUR_BOT_ID"
ALLOWED = "ALL" # Set to "ALL" or specify usernames
Send /start
to initiate anonymous messaging.
Click "Create an anonymous link for me ✅", then copy and share your unique link.
Recipients receive anonymous messages, and can reply using inline buttons.
- 🔒 Uses MD5 hashing for webhook authentication
- 🔐 Encrypts user reply callback data with XOR and Base64 encoding
This project is licensed under the GPL License.
Created by SORENSHAMLOU, Version 1.0.0
.