ΜJoin my telegram channel β https://t.me/cipher_attacks
A modular Telegram UserBot built on telethon. integrates Gemini for context-aware automation, Edge-TTS for localized voice synthesis, and a custom media stack.
Installation Β· System Core Β· Modules Manual Β· Troubleshooting
Project Akasha is a userbot that actually understands context. instead of static replies, it reads the last few messages and writes something that fits β mimicking your tone and style.
it also includes a TTS wrapper for Amharic/English voice notes, a two-stage music downloader that goes easy on RAM, and a set of group management tools. runs on local machines or cloud (Heroku/Railway).
make sure your directory matches this layout. the bot uses relative paths for fonts and database files.
.
βββ .env
βββ config.py
βββ main.py
βββ requirements.txt
βββ docker-compose.yml
βββ Dockerfile
βββ Procfile
βββ setup.sh
βββ LICENSE
βββ core
β βββ database.py
βββ plugins
βββ admin_tools.py
βββ ai.py
βββ creative.py
βββ master_voice.py
βββ music.py
βββ security.py
βββ growth.py
βββ system.py
1. Prerequisites
requires Python 3.9+ and FFmpeg.
Ubuntu/Debian:
sudo apt update && sudo apt install python3 python3-pip ffmpeg -yWindows:
- install Python from python.org.
- install FFmpeg and add it to system PATH.
2. Dependencies
pip install -r requirements.txt3. Configuration (.env)
create a .env file in the root directory.
# telegram
API_ID=123456
API_HASH=your_api_hash
SESSION=1BVts...
# gemini keys β separate with commas
GEMINI_KEYS=AIzaSy1...,AIzaSy2...,AIzaSy3...
# or individually
GEMINI_KEY1=AIzaSyD...
GEMINI_KEY2=AIzaSyF...
GEMINI_API_KEY=AIzaSy...
# database β leave empty for local json
MONGO_URL=β οΈ never commit your
.envor session string to any public repo.
4. Run
python main.pyvalidates keys on startup via Config.check_integrity().
for Render, Railway, or Heroku β skip the .env and inject these directly into the dashboard:
API_IDAPI_HASHSESSIONGEMINI_KEYS(comma separated:Key1,Key2,Key3)
managed by plugins/system.py. handles the away-state logic.
| Command | Logic |
|---|---|
.auto ai |
reads the last 5 messages and writes a reply that fits the conversation. |
.auto static |
replies with a fixed string (e.g., "Busy"). |
.auto off |
disables all automation. |
.auto [text] |
updates the static reply text. |
changes the tone of replies.
sleep- short, groggy responses.work- professional, concise.gaming- dismissive/short.default- standard conversational style.
keeps replies from looking automated:
- read delay: random
1-3spause before marking as read. - typing: calculates
len(response) * 0.1sto match realistic typing speed.
- Whois:
.whois @user. pulls a user profile card (ID, DC, scam status, bio). - Translator:
Text //lang_code. replaces the message with the translation (e.g.,Hey //amβα°αα). - Moderation:
.purgeβ deletes messages recursively..ban / .muteβ standard user restrictions..zombiesβ scans for deleted accounts and removes them to fix member counts.
Caution
heavy purges or zombie cleaning can trigger telegram's floodWait. use sparingly.
wrapper for Microsoft Edge TTS. supports SSML tags for pitch and rate control.
Command: .say [text] [flags]
- auto-switches between
Mekdes(Amharic) andJenny(English) based on script.
| Flag | Effect |
|---|---|
.f / .m |
force female/male voice. |
.echo |
hall effect. |
.radio |
high-pass/low-pass filter chain. |
.demon |
pitch shift -400Hz. |
.kid |
pitch shift +400Hz. |
.whisper β shortcut for .slow + low volume.
pillow based image manipulation.
- Meme Gen:
.meme [Top];[Bottom].- auto-fetches
NotoSansEthiopic-BoldorNotoSansArabicbased on script. caches fonts locally.
- auto-fetches
- Sticker Kang:
.kang. converts media to512pxWebP and appends to your sticker pack.- skips files >5MB to avoid memory issues on VPS.
uses yt-dlp for SoundCloud/YouTube extraction.
.song [Query]β fetches metadata only. caches in RAM.- reply
1 to 5to select. - downloads β converts to MP3 192kbps β writes id3 tags β uploads.
Note
files >50MB are rejected to avoid upload timeouts.
.ai [prompt]β uses the rotated key pool.- reply to an image with
.ai explainβ downloads to memory buffer, sends to vision API. .img/.imgsβ pulls images from DuckDuckGo.
disabled by default. hooks into MessageMedia events - if ttl_period > 0:
- downloads media to temp.
- forwards to Saved Messages.
- tags with "κ vault capture".
.hack @userβ edits a message repeatedly to simulate a terminal sequence. prank only.
session-based tool for moving users between groups. handles dedup, filtering, and rate limits automatically.
- Collect:
.scrape @group- pulls users into local session.- multi-source:
.scrape @g1 @g2 @g3- merges and dedupes across all. - ranks by last-seen activity (
online > recently > last_week > last_month).
- multi-source:
- Move:
.addmembers @dest- processes the list into a destination group.- skips anyone already there. most-active users go first.
- adaptive sleep - shortens on clean runs, extends after rate limit hits. jitter on every pause.
- Status:
.gstatus- live progress bar, eta, and per-result breakdown. - Stop:
.gstop- graceful cancel. session stays intact. - Filters:
.gfilter- set before collecting.max_last_seen- activity cutoff (online | recently | last_week | last_month | any).require_username,require_phone,exclude_premium,max_count.- example:
.gfilter max_last_seen=recently require_username=true max_count=1000
- Data:
.gexport/.gimport- save and restore session as json. - Clear:
.gclear- resets session. filters and rejected cache are kept.
note: invites go out from your account. telegram restricts accounts that move too fast. use a secondary account you don't mind losing - not your main.
FFmpeg not found:
make sure FFmpeg is in your system PATH or install via apt.
API key errors:
keys auto-rotate, but if all are exhausted .ai will return an error. check your key quota.
Dependency issues:
pip install --force-reinstall -r requirements.txtLicensed under the MIT License.
Project Akasha v1.0
Built for the Unknown purpose βοΈ.

