text stringclasses 3
values |
|---|
python-telegram-bot[job-queue]>=21.0 |
google-generativeai==0.8.4 |
aiosqlite>=0.20.0 |
π‘οΈ TelegramGuard
AI group guardian that actually answers your questions.
Anti-spam. Vision. Chat. No topic off-limits.
Use It Now (Zero Setup)
Add the official bot to your Telegram group. No install, no config, no cost.
- Open Telegram, search
@iLangGuardBot - Add it to your group
- Grant admin permissions (delete messages + ban users)
- Done. Spam protection is automatic.
You can also DM the bot directly for AI chat.
What It Does
Anti-Spam β AI three-step analysis detects ads, scams, crypto spam, porn, political propaganda. Sees through Unicode tricks, emoji stuffing, homophone substitution. Catches repeat flooding (same message 3+ times) with zero AI cost. Bans and deletes all recent messages in parallel.
Vision β Reads images and video thumbnails. Catches image spam. In chat mode, analyzes what's really happening in a photo, not just describing objects.
Chat β @ the bot in any group or DM privately. Multilingual, auto-detects your language. Finance, tech, relationships, culture, anything. Answers first, lectures never.
Three-Step Method for Sensitive Topics β Most bots refuse. TelegramGuard uses a different approach:
| Step | What happens |
|---|---|
| Insider Risks | Shares what actually goes wrong: scams, traps, consequences |
| Reality Check | Asks if you're curious or serious, no judgment |
| Direction | Gives enough info to make smart decisions |
Host Your Own
Option 1: VPS (One Command)
curl -sL https://raw.githubusercontent.com/ilang-ai/TelegramGuard/main/install.sh | sudo bash
The script handles everything: clone, dependencies, token setup, systemd service, auto-start.
You need two things (both free):
- Bot Token β open Telegram β @BotFather β
/newbot - Gemini API Key β aistudio.google.com/apikey
After install:
systemctl status telegramguard # check status
systemctl restart telegramguard # restart
journalctl -u telegramguard -f # live logs
Option 2: HuggingFace Space (Free, No Server)
- Fork this repo
- Create a HuggingFace Space β Docker SDK β Blank
- GitHub repo Settings β Secrets β add
HF_TOKEN(your HF write token) - HF Space Settings β Secrets β add
BOT_TOKEN+GEMINI_API_KEY - Push to GitHub triggers auto-deploy to HF
Option 3: Manual
git clone https://github.com/ilang-ai/TelegramGuard.git
cd TelegramGuard
pip install -r requirements.txt
export BOT_TOKEN="your-token"
export GEMINI_API_KEY="your-key"
python bot.py
Customize the AI
The bot's brain lives in .ilang files using I-Lang Prompt Spec:
prompts_demo/
βββ persona.ilang How it thinks + how it talks
βββ antispam.ilang What counts as spam
βββ vision.ilang How it reads images
Each file contains ::GENE definitions that control behavior:
::GENE_IMMUTABLE{S001, T:ANTI_COLLAPSE, A:MORAL_PANICβLETHAL, G:ALL, Ξ:ALWAYS}
# When user raises grey topics: don't panic, analyze objectively.
::IMMUNE{RISKY_OR_ILLEGAL, THREE_STEP_RESPONSE}
# Step 1: Insider risks Step 2: Reality check Step 3: Direction
Change the genes, change the bot. To customize: copy prompts_demo/ to prompts/, edit. The bot loads prompts/ first.
BotFather Setup
After creating your bot, send to @BotFather:
/setjoingroups β Enable
/setprivacy β Disable
Architecture
TelegramGuard/
βββ bot.py Core (group + private + events)
βββ config.py Env vars
βββ install.sh One-line VPS installer
βββ Dockerfile HF Space deployment
βββ modules/
β βββ chat.py AI engine (loads .ilang prompts)
β βββ db.py Shared SQLite + async lock
β βββ database.py Schema
β βββ admin.py Group admin
βββ prompts_demo/ AI personality (.ilang files)
Built with I-Lang Prompt Spec β structured AI instructions using genetic code.
MIT | Eastsoft Inc. | I-Lang Research
- Downloads last month
- -