🚀 Advanced Telegram Bot for Automated Message Reactions • Built on Cloudflare Workers • 100% Serverless • Enterprise Ready
- ✅ Automatic Message Reactions - Smart reaction system for all message types
- ✅ Multi-Chat Support - Simultaneous operation in groups, supergroups, and channels
- ✅ Customizable Reaction Sets - Fully configurable emoji library
- ✅ Intelligent Randomization - Adaptive reaction probability system
- ✅ Real-time Processing - Sub-second reaction times using Cloudflare's global network
- ✅ Serverless Architecture - Zero infrastructure costs, auto-scaling
- ✅ High Availability - 99.9% uptime guaranteed by Cloudflare
- ✅ Security First - Environment variable protection, input validation
- ✅ Comprehensive Logging - Detailed activity monitoring and analytics
- ✅ RESTful API - Health checks, status endpoints, and configuration management
- ✅ Smart Rate Limiting - Prevents API abuse and ensures compliance
- ✅ Selective Chat Restrictions - Granular control over bot behavior
- ✅ Donation System - Integrated payment processing for supporter rewards
- ✅ Multi-environment Support - Development, staging, and production ready
- ✅ Automated Deployment - CI/CD with GitHub Actions
Before deployment, ensure you have:
- Telegram Bot Token from @BotFather
- Cloudflare Account (for Workers deployment)
- GitHub Account (for CI/CD and repository management)
- Node.js 18+ (for local development)
Configure these essential variables in your deployment platform:
| Variable | Description | Example | Required |
|---|---|---|---|
BOT_TOKEN |
Telegram Bot API token | 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 |
✅ |
BOT_USERNAME |
Your bot's username (without @) | AlisaReactionBot |
✅ |
EMOJI_LIST |
Comma-separated emojis for reactions | 👍,❤️,🔥,🎉,👏,😂,😮,😢,🤔,👀 |
✅ |
RANDOM_LEVEL |
Reaction randomness (0-10) | 5 |
❌ (Default: 0) |
RESTRICTED_CHATS |
Chat IDs to exclude | -100123456,789012345 |
❌ |
| Level | Behavior | Reaction Chance |
|---|---|---|
| 0 | Always react | 100% |
| 5 | Moderate randomness | 50% |
| 10 | Maximum randomness | 0% (Never reacts) |
graph TB
A[Telegram Chat] --> B[Telegram API]
B --> C[Cloudflare Worker]
C --> D[Bot Logic Engine]
D --> E[Reaction Processor]
E --> F[Response Handler]
F --> G[Database/Storage]
G --> H[Analytics & Logging]
H --> A
style C fill:#f9f,stroke:#333,stroke-width:2px
- Click the "Deploy to Cloudflare Workers" button above
- Authorize with your Cloudflare account
- Configure environment variables in the dashboard
- Set webhook URL:
https://api.telegram.org/bot<BOT_TOKEN>/setWebhook?url=<YOUR_WORKER_URL>
# Clone repository
git clone https://github.com/Shineii86/AlisaReactionBot.git
cd AlisaReactionBot
# Install dependencies
npm install
# Configure wrangler.toml
cp wrangler.example.toml wrangler.toml
# Edit wrangler.toml with your settings
# Deploy to Cloudflare
npx wrangler deploy-
Fork this repository
-
Add secrets to your repository:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_IDBOT_TOKENBOT_USERNAMEEMOJI_LISTRANDOM_LEVELRESTRICTED_CHATS
-
Run the deployment workflow:
- Navigate to Actions → 🚀 Deploy to Cloudflare Workers → Run workflow
After deployment, configure your Telegram webhook:
# Set webhook
curl -X POST https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook \
-H "Content-Type: application/json" \
-d '{"url": "https://your-worker.your-subdomain.workers.dev"}'
# Verify webhook
curl https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getWebhookInfo| Command | Description | Usage |
|---|---|---|
/start |
Initialize bot and show welcome message | /start |
/reactions |
Display available reaction emojis | /reactions |
/donate |
Support bot development | /donate |
/help |
Show help information | /help |
/stats |
Display bot statistics | /stats |
# Check bot health
curl https://your-worker.your-subdomain.workers.dev/health
# Response:
{
"status": "healthy",
"timestamp": "2024-01-15T10:30:00.000Z",
"version": "2.1.0",
"bot": {
"username": "AlisaReactionBot",
"healthy": true,
"reactions": 15,
"restricted_chats": 2
}
}| Endpoint | Description | Method |
|---|---|---|
/health |
Comprehensive health check | GET |
/status |
Bot status and statistics | GET |
/config |
Configuration overview | GET |
# Clone the repository
git clone https://github.com/Shineii86/AlisaReactionBot.git
cd AlisaReactionBot
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Start local development server
npm run dev
# Run tests
npm test
# Build for production
npm run build# Run unit tests
npm test
# Run with coverage
npm run test:coverage
# Run integration tests
npm run test:integrationWe love your input! We want to make contributing as easy and transparent as possible.
- Fork the repository
- Create a 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
When reporting issues, please include:
- Detailed description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
- Environment information
| Metric | Value | Description |
|---|---|---|
| Response Time | < 100ms | Average reaction time |
| Uptime | 99.9% | Service reliability |
| Scalability | Infinite | Automatic scaling with demand |
| Cost | $0/month* | Free tier sufficient for most use cases |
*Based on Cloudflare Workers free tier
- Shinei Nouzen - Lead Developer & Maintainer
- Malith Rukshan - Original Concept & Inspiration
- Telegram Bot API - Official Telegram API
- Cloudflare Workers - Serverless platform
- Node.js - JavaScript runtime
- Wrangler - Development tool
- Telegram API Team for continuous improvements
- Cloudflare Team for amazing serverless platform
- Open Source Community for contributions and feedback
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project helpful, please consider:
- Giving a Star ⭐ on GitHub
- Sharing with your network
- Contributing code or documentation
- Donating to support development
