Here's a professional markdown file for your Telegram QR Code Generator Bot:
A powerful and feature-rich Telegram bot that generates custom QR codes with advanced customization options, encryption support, and comprehensive analytics.
- Multi-Format QR Generation
- Plain Text
- URLs & Links
- WhatsApp Direct Messages (Coming Soon)
- vCard Contact Information
- Social Media Profiles
- WiFi Network Credentials (Coming Soon)
- Customization Options
- Custom Colors & Gradients
- Adjustable Sizes
- Logo Integration (Comming Soon)
- Multiple Output Formats
- Custom Dot Patterns
- 📊 Usage Statistics
- 📈 User Activity Tracking
- 🌐 Multi-language Support (English & Arabic)
- 🎨 Intuitive User Interface
- ⚡ Fast Processing
- 💾 History Management
- Node.js (v14.x or higher)
- npm (v6.x or higher)
- Telegram Account
- Bot Token from @BotFather
-
Clone the Repository
git clone https://github.com/TerminalDZ/Telegram-QR-Code-Generator-Bot.git cd Telegram-QR-Code-Generator-Bot
npm install
- Start a conversation with @BotFather on Telegram
- Create your bot:
/newbot
- Follow BotFather's prompts:
- Set a display name for your bot
- Choose a unique username ending in 'bot'
- Save the HTTP API token provided by BotFather
- Sign up at Supabase
- Create a new project
- Note down your:
- Project URL
- Anon/Public Key
- Service Role Key (Keep this secret!)
Execute these SQL commands in your Supabase SQL editor:
-- QR Codes Table
CREATE TABLE IF NOT EXISTS qr_codes (
id SERIAL PRIMARY KEY,
user_id BIGINT NOT NULL,
content TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- User Usage Statistics
CREATE TABLE IF NOT EXISTS user_usage (
user_id BIGINT PRIMARY KEY,
usage_count INTEGER DEFAULT 0
);
-- Text Frequency Tracking
CREATE TABLE IF NOT EXISTS used_texts (
user_id BIGINT,
text TEXT,
count INTEGER DEFAULT 1,
PRIMARY KEY (user_id, text)
);
-- Create indexes for better performance
CREATE INDEX idx_qr_codes_user_id ON qr_codes(user_id);
CREATE INDEX idx_used_texts_user_id ON used_texts(user_id);
Create a .env
file in your project root:
# Bot Configuration
TELEGRAM_BOT_TOKEN=your_bot_token_here
# Supabase Configuration
SUPABASE_URL=your_project_url
SUPABASE_API_KEY=your_anon_key
# Development mode
npm run dev
# Production mode
npm start
- Send
/start
to your bot on Telegram - Try generating a QR code with
/qr test
- Check your Supabase dashboard for new entries
Common issues and solutions:
- Bot not responding: Verify your
TELEGRAM_BOT_TOKEN
in.env
- Database errors: Check Supabase connection credentials
- QR generation fails: Ensure all dependencies are properly installed
/start - Initialize the bot
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- node-telegram-bot-api
- qrcode
- All contributors who helped shape this project
Made with ❤️ by TerminalDZ
⭐️ Star this repository if you found it helpful!