πΈ A premium Telegram waifu collection bot β guess, collect, trade & battle your waifus! Built with Pyrogram Β· MongoDB Β· Async Β· Smart Anti-Spam
- πΈ Auto Spawn β Waifus spawn after N group messages
- π― Smart Guess β Fuzzy name matching, multi-word support
- βοΈ Battle System β 1v1 waifu battles with rarity stats
- π Harem β View your full collection inline
- β€οΈ Favourites β Pin up to 5 waifus to your profile
- π 2-Way Trade β Trade waifus with confirm/cancel
- πΈ Sakura Economy β Earn coins, pay, leaderboard
- π‘ Anti-Spam β Per-user rate limit, spawn farm protection
- π Inline Search β Search global DB or any user's collection
- π Stats & Ping β Live bot health dashboard
- π’ Broadcast β Owner-level announcements
- π Group Logger β Logs bot add/remove to log channel
YUKIWAFUS/
βββ YUKIWAFUS/
β βββ __init__.py # Pyrogram client
β βββ __main__.py # Module auto-loader
β βββ logging.py # Colorlog setup
β βββ database/
β β βββ Mangodb.py # All MongoDB collections
β βββ utils/
β β βββ api.py # Waifu API helpers
β β βββ helpers.py # sc(), cmd() utils
β βββ modules/
β βββ WAIFU/
β β βββ start.py
β β βββ spawn.py # Auto spawn + anti-spam
β β βββ guess.py
β β βββ harem.py
β β βββ hclaim.py
β β βββ battle.py
β β βββ fav.py
β β βββ trade.py
β β βββ balance.py
β β βββ daily.py
β βββ ADMIN/
β β βββ addwaifu.py
β β βββ sudo.py
β β βββ broadcast.py
β βββ TOOLS/
β βββ ping.py
β βββ stats.py
β βββ group.py
β βββ inline_query.py
βββ config.py
βββ requirements.txt
Create a config.py or set environment variables:
| Variable | Required | Description |
|---|---|---|
API_ID |
β | Telegram API ID from my.telegram.org |
API_HASH |
β | Telegram API Hash |
BOT_TOKEN |
β | Bot token from @BotFather |
MONGO_URI |
β | MongoDB connection string |
OWNER_ID |
β | Your Telegram user ID |
LOG_CHANNEL |
β | Channel/group ID for bot logs |
SUDO_USERS |
β | List of sudo user IDs |
WAIFU_API_URL |
β | Waifu API base URL |
WAIFU_PICS |
β | List of fallback photo URLs |
Requirements: Ubuntu 20.04+ Β· Python 3.11+ Β· MongoDB
# 1. Clone the repo
git clone https://github.com/YOURNAME/YUKIWAFUS
cd YUKIWAFUS
# 2. Install Python 3.11 (if not present)
sudo apt update && sudo apt install -y python3.11 python3.11-venv python3-pip
# 3. Create virtual environment
python3.11 -m venv venv
source venv/bin/activate
# 4. Install dependencies
pip install -r requirements.txt
# 5. Configure
cp config.example.py config.py
nano config.py # fill in your values
# 6. Run
python -m YUKIWAFUSRun as a background service (systemd):
sudo nano /etc/systemd/system/yukiwafus.service[Unit]
Description=YUKIWAFUS Telegram Bot
After=network.target
[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu/YUKIWAFUS
ExecStart=/home/ubuntu/YUKIWAFUS/venv/bin/python -m YUKIWAFUS
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable yukiwafus
sudo systemctl start yukiwafus
# Check logs
sudo journalctl -u yukiwafus -f
β οΈ Free tier no longer available. Requires Eco/Basic dyno ($5/mo)
- Click Deploy on Heroku button above
- Fill in all config vars in the Heroku dashboard
- Set dyno type to
worker(notweb) - Enable the dyno after deploy
# Or via CLI
heroku create yukiwafus-bot
heroku config:set BOT_TOKEN=xxx API_ID=xxx API_HASH=xxx MONGO_URI=xxx
git push heroku main
heroku ps:scale worker=1Procfile (create this in root):
worker: python -m YUKIWAFUS
- Click Deploy on Render button above
- Select Background Worker (not Web Service)
- Set build command:
pip install -r requirements.txt - Set start command:
python -m YUKIWAFUS - Add all environment variables
β Render free tier works for bots (no sleep for background workers)
- Click Deploy on Railway button above
- Connect your GitHub repo
- Add environment variables in the Railway dashboard
- Railway auto-detects Python and deploys
# Or via CLI
railway login
railway init
railway upFROM python:3.11-slim
WORKDIR /app
COPY . .
RUN pip install --no-cache-dir -r requirements.txt
CMD ["python", "-m", "YUKIWAFUS"]docker build -t yukiwafus .
docker run -d \
-e BOT_TOKEN=xxx \
-e API_ID=xxx \
-e API_HASH=xxx \
-e MONGO_URI=xxx \
-e OWNER_ID=xxx \
-e LOG_CHANNEL=xxx \
--name yukiwafus \
yukiwafus| Command | Description | Access |
|---|---|---|
/start |
Start the bot | All |
/guess <name> |
Guess active waifu | Groups |
/harem |
View your collection | All |
/fav <name> |
Add to favourites | All |
/unfav <name> |
Remove from favourites | All |
/myfav |
View favourites list | All |
/balance |
Check Sakura balance | All |
/pay <amount> |
Pay another user | All |
/trade <waifu> | <waifu> |
Trade waifus | All |
/daily |
Claim daily reward | All |
/battle |
Battle another user | Groups |
/spawnon |
Enable waifu spawn | Admin |
/spawnoff |
Disable waifu spawn | Admin |
/setspawn <n> |
Set spawn rate | Admin |
/fspawn |
Force spawn | Sudo |
/addwaifu |
Add waifu to DB | Sudo |
/broadcast |
Broadcast message | Owner |
/addcoins |
Add coins to user | Sudo |
/deduct |
Deduct coins | Sudo |
/ping |
Bot ping & health | All |
/stats |
Bot statistics | All |
YUKIWAFUS has a built-in smart anti-spam system in spawn.py:
- Per-user rate limit β 3 messages in 3 seconds = spam detected
- 5 min block β spammer's messages don't count toward spawn
- One-time warning β user gets warned once per block session
- Chat cooldown β 10 sec between spawns (mass activity guard)
- Global cooldown β 2 sec between any spawn across all groups
- Memory guard β auto-cleans dicts at 10,000 entries
# Fork β Clone β Branch β PR
git clone https://github.com/YOURNAME/YUKIWAFUS
git checkout -b feature/my-feature
# make changes
git commit -m "feat: my feature"
git push origin feature/my-feature
# open Pull Request on GitHubIf this bot helped you, please star the repo β it helps a lot!
This project is licensed under the MIT License β see LICENSE for details.
