A Telegram bot that sends daily top stories from Hacker News to configured Telegram channels and groups.
- 📰 Fetches top stories from Hacker News
- ⏰ Sends daily updates at 8:00 AM EAT (Ethiopia/Addis Ababa time)
- 💬 Supports multiple Telegram channels and group topics
- 🤖 Responds to commands like
/getnews
and/help
/start
- Welcome message and bot introduction/getnews
- Get latest top Hacker News stories/help
- Show available commands and information
- Clone the repository
- Install dependencies:
npm install
- Create a
.env
file with:TELEGRAM_BOT_TOKEN=your_bot_token TELEGRAM_DESTINATIONS=@channel1,@group1@topic1,@channel2
- Start the bot:
npm start
TELEGRAM_BOT_TOKEN
: Your Telegram bot token from @BotFatherTELEGRAM_DESTINATIONS
: Comma-separated list of destinations- For channels/groups:
@channelname
- For topic threads:
@groupname@topicid
- For channels/groups:
├── src/
│ ├── config/
│ │ └── config.js # Configuration setup
│ ├── services/
│ │ ├── hnService.js # Hacker News API integration
│ │ └── messageService.js # Telegram message handling
│ ├── utils/
│ │ ├── logger.js # Logging utility
│ │ ├── messageFormatter.js # Message formatting
│ │ └── scheduler.js # Scheduling utility
│ └── index.js # Main bot file
├── .env
├── .gitignore
├── package.json
└── README.md
MIT