Skip to content

This project is a Telegram bot that allows users to send anonymous messages to each other.Built using Python,it features a simple user interface and leverages the Telegram API for seamless communication.The bot includes functionalities like creating anonymous links, setting webhooks.

License

Notifications You must be signed in to change notification settings

Soren2007/telegram-anonymous-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Telegram Anonymous Chat Bot

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.

Features

  • ✅ 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

Installation & Setup

1️⃣ Clone the Repository

Clone the project to your local machine:

git clone https://github.com/Soren2007/telegram-anonymous-chatbot.git
cd telegram-anonymous-chatbot

2️⃣ Create a Python Worker

Ensure your environment supports Python execution.

3️⃣ Set Up D1 Database

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
);

4️⃣ Configure Webhook

Open the worker in a browser and visit:

https://yourworker.username.workers.dev/init

5️⃣ Update Configuration

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

Usage

🤖 Start the Bot

Send /start to initiate anonymous messaging.

📩 Create an Anonymous Link

Click "Create an anonymous link for me ✅", then copy and share your unique link.

✉️ Sending Anonymous Messages

Recipients receive anonymous messages, and can reply using inline buttons.

Security & Encryption

  • 🔒 Uses MD5 hashing for webhook authentication
  • 🔐 Encrypts user reply callback data with XOR and Base64 encoding

License

This project is licensed under the GPL License.

Author

Created by SORENSHAMLOU, Version 1.0.0.


About

This project is a Telegram bot that allows users to send anonymous messages to each other.Built using Python,it features a simple user interface and leverages the Telegram API for seamless communication.The bot includes functionalities like creating anonymous links, setting webhooks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages