A Python-based Telegram bot that delivers daily updates of top Hacker News stories to your group chat.
- Daily updates at 8:00 AM EAT (UTC+3)
- Top 10 highest-ranked Hacker News stories
- Interactive commands (
/getnews
,/help
) - Error handling with retry mechanism
- Clean message formatting with HTML support
- Python 3.7+
- Telegram Bot Token
- Telegram Group Chat ID
- Clone the repository:
git clone https://github.com/snackshell/Hacker-News-Bot.git
cd Hacker-News-Bot
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in the project root:
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_here
Run the bot:
python src/bot.py
/start
- Welcome message and bot introduction/getnews
- Get current top 10 Hacker News stories/help
- Display help message and available commands
├── src/
│ ├── bot.py # Main bot setup and command handlers
│ ├── hn_service.py # Hacker News API integration
│ ├── message_formatter.py # Message formatting utilities
│ └── scheduler.py # Daily update scheduling
├── .env # Environment variables
├── requirements.txt # Python dependencies
└── README.md # Project documentation
MIT