Instant life advice at your fingertips - powered by Python and positivity
- 25+ curated wisdom nuggets across 5 categories
- One-tap interaction with smart reply keyboards
- Markdown-rich formatting for optimal readability
- 24/7 reliable hosting on Render
- Crash-resistant architecture with auto-recovery
- Python 3.10+
- Telegram bot token (@BotFather)
- Render account (free tier available)
# 1. Clone repository
git clone https://github.com/yourusername/lifeboost-bot.git
cd lifeboost-bot
# 2. Install dependencies
pip install -r requirements.txt
# 3. Configure environment
echo "TELEGRAM_BOT_TOKEN=your_token_here" > .env
# 4. Launch bot
python bot.py
## π οΈ Tech Stack
| Component | Technology Used | Purpose |
|-----------------|-------------------|----------------------------------|
| Core Framework | Python 3.10 | Backend logic and execution |
| Telegram API | pyTelegramBotAPI | Handles bot communication |
| Web Server | Flask | Provides health checks for Render|
| Configuration | python-dotenv | Secures environment variables |
| Error Handling | Python logging | Tracks and reports bot crashes |
# 1. Resilient bot launch
threading.Thread(
target=bot.infinity_polling,
daemon=True
).start()
# 2. Advice database
ADVICE_LIBRARY = {
"π Productivity": [
"2-minute rule: If a task takes <2 mins, do it NOW",
# ... 25+ more gems ...
]
}
# 3. Interactive keyboard
def create_main_keyboard():
return ReplyKeyboardMarkup(
row_width=2,
resize_keyboard=True
)
π Deployment Guide
Set up on Render:
Connect your GitHub repo
Add TELEGRAM_BOT_TOKEN environment variable
Set start command: python bot.py
Verify deployment:
Check logs for Bot started in background thread
Visit your Render URL to see "β
Bot is running!"
π€ Contributing
We welcome improvements! Here's how:
Fork the repository
Create a feature branch (git checkout -b feature/your-feature)
Commit your changes (git commit -m 'Add amazing feature')
Push to the branch (git push origin feature/your-feature)
Open a Pull Request
π License
MIT License - Free for personal and commercial use