A powerful, fully self hosted Telegram bot that puts your privacy first. No logs, no tracking, no third-party data collection just pure encrypted functionality.
Forever Free • Open Source • Zero Compromises on Privacy
Built by DresOS — because your data belongs to you.
DresGuardian combines advanced group moderation with a privacy respecting AI assistant:
/ask <question>— Chat with a powerful AI powered by Cerebras Llama 3.3-70B (no OpenAI, no data harvesting)/search <query>— Fully anonymized and encrypted web search via DuckDuckGo:- Your real IP is never sent — replaced with a fake static IP (
203.0.113.42) - Custom headers: fake User-Agent, Do-Not-Track (
DNT: 1), and spoofed forwarding IPs (X-Forwarded-For,X-Real-IP,Client-IP) - No cookies, no trackers, no referrers
- All requests made over HTTPS with short timeouts
- IP-related queries (e.g., "what is my IP") are automatically blocked to prevent accidental leaks
- Results returned cleanly in HTML with safe links
- Your real IP is never sent — replaced with a fake static IP (
- Mention the bot directly (e.g.,
@YourBot, "hey dres", "yo dres") — triggers AI response - Built-in per-user rate limiting (1.5s cooldown) to prevent spam and abuse
- Warn System:
/warn→ adds a warn. At 3 warns, user is automatically muted for 1 hour (warns reset after punishment) /delwarn,/warns— remove or check warns/kick,/ban,/unban/mute 10m,/mute 2h,/mute 1d— timed mutes with flexible duration/unmute- Banned Words Filter:
/addword <phrase>— any message containing the word/phrase is auto-deleted /removeword— remove from banned list
/setwelcometext <message>— supports placeholders:{first}→ user's first name{mention}→ clickable mention{username}→ @username or name if none{id}→ user ID
/setmedia— reply to a photo, GIF, or video to set welcome media/setchannellink <url>— adds a "Join Channel" button/clearwelcome— remove welcome entirely- Welcomes trigger on new members (supports both legacy and new chat member updates)
/blacklist— globally blacklist a user from the bot/unblacklist,/blacklisted— manage and view the global blacklist
- All settings (welcomes, banned words, warns, global blacklist) are stored locally in a single file:
dresguardian_store.json - No database required
- No cloud sync
- Easy to backup or migrate — just copy the JSON file
- Data is loaded on startup and saved automatically after changes
- File is written with proper encoding and indentation — human-readable if needed
- Zero logging of messages, queries, or user activity
- No analytics or external tracking
- Sensitive credentials (bot token, API keys) loaded securely from
.env— never hardcoded - AI requests go only to Cerebras (privacy-respecting provider) over encrypted connections
- Search requests are fully anonymized and protected as described above
- End-to-end handling: Messages processed in memory only — nothing persisted beyond configuration
- You control the server — full data sovereignty and encryption at rest (depends on your filesystem)
- Debian/ubuntu
- Python 3.8+
- Telegram account
- Cerebras API key (free tier available)
-
Telegram Bot Token
- Chat with @BotFather
- Send
/newbot - Follow instructions → receive your bot token
-
Your Telegram User ID (for OWNER_ID)
- Chat with @userinfobot
- It will instantly reply with your numeric ID
-
Cerebras API Key (free and secure)
- Visit https://cerebras.ai
- Sign up / log in
- Go to API section → generate a key (starts with
csk-)
- Clone the repo
sudo apt update && sudo apt full-uprgrade -ysudo apt install gitsudo apt install python3git clone https://github.com/DresOperatingSystems/Dresguardiancd Dresguardian- create a venv (this is for self hosting and so we dont run into issues)
sudo apt updatesudo apt install python3-venvpython3 -m venv .venv && source .venv/bin/activate- after install the dependencies
pip install -r requirements.txt- set up tbe .env file
sudo apt install nanocp .env-sample .envnano .envinput your variables
- self host
sudo apt install nohupnohup python dresguardian.py &deactivateexitnow your bot is being self hosted for extra backend security install and start tor along with setting up mac randomization and run your machine through a vpn/proxy service
anyways we hope you like this one and we wish you a merry christmas from the entire Dres team