Proprietary AI-Powered Community Manager for Telegram
Created by @DecentralizedJM
An intelligent Telegram bot powered by Google Gemini 3 Pro Preview that manages community conversations, detects scams, provides emotional support, and answers questions about Mudrex with a polite, helpful, and positive personality.
Core Traits:
- π Polite & Positive - Always supportive and encouraging
- π€ Professional but Friendly - Builds trust with the community
- π Empathetic - Provides emotional support during market volatility
- π‘οΈ Protective - Actively detects and warns against scams
- π¬π§ English-First - Uses Hindi/Hinglish only when users speak Hindi
Communication Style:
- Uses varied vocabulary (never repeats generic phrases)
- Responds with warmth and professionalism
- De-escalates angry users with empathy
- Handles trolls by staying kind and professional
- Provides crisis support for distressed users
- Model:
gemini-3-pro-preview- Google's latest and most advanced AI - Temperature: 0.8 (creative and varied responses)
- Structured JSON Output - Reliable decision-making
- Context-Aware - Analyzes last 15 messages for conversation flow
-
Pre-AI Filtering - Blocks spam before API call (90% efficiency)
- Ignores: "lol", "ok", emoji-only, 1-3 char messages
- Detects: Critical keywords (P2P, USDT selling, VIP signals)
-
Critical Keyword Detection
- P2P deals, investment scams, phishing attempts
- Automatic response with admin tagging
-
AI Decision Engine
- Context-aware threat assessment
- Polite warnings instead of mocking
- Tags:
@DecentralizedJMand@babaearn23
- Daily Limit: 50 responses/day
- Auto-Reset: Midnight (prevents spam)
- Smart Filtering: Only critical/direct messages reach AI
- Cost Optimization: 90% of messages filtered pre-AI
1. Scam Detection (Highest Priority)
- Detects: P2P solicitation, fake investments, phishing
- Response: "Hey there! This looks like a P2P solicitation which isn't allowed here. @DecentralizedJM @babaearn23 - please review this message."
2. Troll Handling
- Light teasing β Warm, humorous response
- Persistent baiting β Silent ignore
- Strategy: Kill them with kindness
3. Angry User De-escalation
- Detects: CAPS LOCK, "SCAM", frustration
- Response: "I understand you're frustrated. Let's get this sorted out! Please email help@mudrex.com and the team will assist you right away."
4. Crisis Support
- Detects: Suicidal ideation, extreme distress
- Response: Empathetic support + resource connection
- Example: "Please know that your life is worth far more than any crypto portfolio. You are not alone. @DecentralizedJM @babaearn23"
5. Casual Engagement
- Greetings: "Good morning! βοΈ How can I help you today?"
- Checks history to avoid being clingy
- Friendly but not intrusive
6. Company Q&A
- Answers Mudrex-related questions
- Directs to help@mudrex.com when needed
- Uses knowledge base for accurate information
- Node.js (v16+)
- Telegram Bot Token (from @BotFather)
- Gemini API Key (from Google AI Studio)
# Clone the repository
git clone https://github.com/DecentralizedJM/mudrex-telegram-intern.git
cd mudrex-telegram-intern
# Install dependencies
npm install
# Create .env file
echo "TELEGRAM_BOT_TOKEN=your_bot_token_here" > .env
echo "GEMINI_API_KEY=your_gemini_key_here" >> .env
# Build TypeScript
npm run build
# Start the bot
npm run botCreate a .env file in the root directory:
TELEGRAM_BOT_TOKEN=7962595360:AAEa...your_token
GEMINI_API_KEY=AIzaSyA...your_key| Command | Description |
|---|---|
/help |
Show bot capabilities and rules |
/stats |
Display daily usage (responses/limit/remaining) |
- β Removed: All React/Vite UI components
- β
Terminal Execution: Runs via
npm run bot - β TypeScript: Type-safe, production-ready code
- β
Environment-Based: Credentials via
.envfile
mudrex-telegram-intern/
βββ bot/
β βββ index.ts # Bot entry point + commands
βββ services/
β βββ geminiService.ts # AI logic (PROPRIETARY - DO NOT MODIFY)
βββ types.ts # TypeScript interfaces
βββ package.json # Dependencies (UNLICENSED)
βββ tsconfig.json # TypeScript config (backend-only)
βββ .env.example # Environment template
βββ LICENSE # Proprietary license
βββ README.md # This file
βββ CHANGELOG.md # Version history
Spam Filter:
β
Send "lol" β Ignored (spam)
β
Send "GM" β Polite greeting (once)
β
Send "" (empty) β Ignored
Scam Detection:
β
"Sell USDT cheap" β Warns + tags admins
β
"P2P deal available" β Warns + tags admins
β
"Join my VIP signal group" β Warns + tags admins
Direct Engagement:
β
"@MudrexIntern_bot how do I deposit?" β Helpful answer
β
"How to withdraw from Mudrex?" β Guides to resources
Emotional Support:
β
"I lost all my money" β Empathetic response
β
Angry user β De-escalates professionally
β
Suicidal ideation β Crisis support + admin tag
{
model: 'gemini-3-pro-preview',
temperature: 0.8, // Creative, varied responses
responseMimeType: 'application/json',
responseSchema: {
shouldReply: boolean, // Decision to respond
reasoning: string, // Why bot decided
response: string | null // Reply text
}
}const DAILY_RESPONSE_LIMIT = 50;
// Auto-resets at midnight
// Tracks: responsesToday, limit, remaining// Ultra-strict filtering
const spamPatterns = [
/^(lol|lmao|haha|ok|k|yes|no|nice|cool|wow|gm|gn|hi|hello)$/i,
/^[\u{1F600}-\u{1F64F}...]+$/u, // Emoji-only
/^.{1,3}$/, // Too short
/^[\s.!?]+$/ // Only punctuation
];const criticalPatterns = [
/\b(sell\s+usdt|buy\s+usdt|p2p\s+deal|dm\s+me|vip\s+signal)\b/i,
/\b(investment\s+opportunity|guaranteed\s+profit|free\s+usdt)\b/i
];- Pre-Filter Efficiency: ~90% of messages blocked before AI call
- Response Time: ~2-3 seconds (Gemini API call)
- Filter Speed: <1ms (regex-based)
- Memory Usage: ~50MB (Node.js baseline)
- API Cost Savings: 90% reduction via smart filtering
- API Keys: Stored in
.env(never committed to git) - No Data Storage: Chat history kept in-memory only (last 20 messages)
- Rate Limiting: Prevents abuse (50 responses/day)
- Proprietary License: Code modifications prohibited without permission
- CHANGELOG.md - Version history and feature timeline
- UPGRADE_SUMMARY.md - Detailed upgrade guide (v1.0 β v2.0)
- LICENSE - Proprietary license terms
- .env.example - Environment variable template
npm run build # Compile TypeScript
npm run start # Run production build
npm run dev # Build + Run
npm run bot # Alias for dev- Modify
services/geminiService.tsfor AI logic - Update
bot/index.tsfor commands/handlers - Test locally with
npm run bot - Build with
npm run build
- β Upgraded to Gemini 3 Pro Preview
- β Removed React/Vite frontend (backend-only)
- β Changed personality: Polite, Helpful, Positive
- β Implemented 50/day rate limiting
- β Enhanced 3-tier spam filtering
- β Added crisis support for suicidal ideation
- β Professional de-escalation for angry users
- β English-first communication
- β Proprietary license and copyright protection
- Basic Telegram bot with Gemini 2 Flash
- React UI for simulation
- Sarcastic personality
This is proprietary software. Modifications are not permitted without explicit written permission from @DecentralizedJM.
For licensing inquiries: https://github.com/DecentralizedJM
Copyright Β© 2025 DecentralizedJM. All Rights Reserved.
This software is proprietary and confidential. Unauthorized copying, modification, distribution, or reverse-engineering is strictly prohibited. See LICENSE file for details.
- Creator: @DecentralizedJM
- Telegram: @DecentralizedJM
- Issues: Open an issue on GitHub (feature requests only)
- Licensing: Contact via GitHub
- Google Gemini AI - Advanced language model
- Telegram Bot API - Messaging platform
- Mudrex - Crypto trading platform
Built with β€οΈ by @DecentralizedJM
Note: This bot is designed for community management. Always comply with Telegram's Terms of Service and local regulations.