Run this test script first:
python test_bot.pyThis will verify:
- ✅ Configuration is correct
- ✅ Bot token is valid
- ✅ Plugins are loading
- ✅ Bot account info
Symptoms:
- Flask server runs fine (shows 200 OK)
- Bot shows "Bot started successfully"
- But doesn't respond to
/startor any commands
Solutions:
# Stop all Python processes
# Then restart your bot
python bot.py# Stop bot (Ctrl+C)
del RoxyZipMakerBot.session
del RoxyZipMakerBot.session-journal
# Restart
python bot.py- Make sure BOT_TOKEN in
.envmatches the bot you're testing - Check bot username in startup logs
- Message the correct bot on Telegram
Error: ModuleNotFoundError: No module named 'pyrogram'
Solution:
pip install -r requirements.txt --upgradeError: ImportError: cannot import name 'Client'
Solution:
pip uninstall pyrogram pyrofork -y
pip install pyrofork TgCryptoError: Bot starts but commands don't work
Check:
-
Verify all
__init__.pyfiles exist:ROXYBASICNEEDBOT/__init__.py ROXYBASICNEEDBOT/plugins/__init__.py ROXYBASICNEEDBOT/modules/__init__.py -
Check folder structure:
zipmaker/ ├── bot.py ├── config.py └── ROXYBASICNEEDBOT/ ├── __init__.py ├── plugins/ │ ├── __init__.py │ ├── roxybot_start.py │ ├── roxybot_filehandler.py │ ├── roxybot_zipcreator.py │ └── roxybot_rename.py └── modules/ ├── __init__.py ├── roxybot_database.py ├── roxybot_keepalive.py └── roxybot_zipmaker.py
###4. Database Connection Issues
Error: MongoDB connection failed
Solutions:
- Check MONGODB_URI in
.env - Verify network access to MongoDB
- Check MongoDB Atlas IP whitelist (add 0.0.0.0/0 for testing)
Bot will still work without MongoDB, but stats won't be saved.
Error: Config validation failed
Check .env file:
API_ID=12345678
API_HASH=your_api_hash_here
BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/Get credentials:
- API_ID & API_HASH: https://my.telegram.org
- BOT_TOKEN: @BotFather on Telegram
- MONGODB_URI: https://mongodb.com/cloud/atlas
Run test commands:
-
Start bot:
python bot.py -
Look for this output:
✅ RoxyBot: Bot started successfully! ✅ RoxyBot: @your_bot_username is now running! 🆔 Bot ID: 123456789 ✅ RoxyBot: Plugins loaded from 'ROXYBASICNEEDBOT/plugins' -
If you see "Warning - Plugins may not be loaded!":
- Check folder structure
- Ensure all
__init__.pyfiles exist - Restart bot
- Find your bot on Telegram (use username from startup logs)
- Send
/start - Bot should reply immediately
If no response:
- Wait 10 seconds (first message can be slow)
- Check bot isn't muted/blocked
- Verify you're testing the right bot
- Check startup logs for errors
While bot is running, open browser:
http://localhost:8080/
Should see: "Bot is running successfully!"
Add to bot.py after imports:
import logging
logging.basicConfig(level=logging.INFO)This will show all Telegram updates received.
If nothing works:
# Stop bot
# Delete session files
del *.session*
# Reinstall dependencies
pip uninstall -y pyrogram pyrofork
pip install -r requirements.txt
# Verify config
python test_bot.py
# Start fresh
python bot.py-
Check bot token:
- Go to @BotFather
- Send
/mybots - Select your bot
- Verify token is correct
-
Create new bot:
- Go to @BotFather
/newbot- Get new token
- Update
.env
-
Check system:
- Python version:
python --version(need 3.8+) - Pip:
pip --version - Dependencies:
pip list | findstr pyrofork
- Python version:
© 2025 RoxyBasicNeedBot ⚡