This Node.js application is a Telegram bot that retrieves news headlines from the Rotter.net Scoops Forum via an RSS feed and sends new headlines as messages to a specified Telegram chat.
It uses node-telegram-bot-api
and iconv-lite
.
- Fetches RSS feed from Rotter.net at regular intervals (default: every 1 minute).
- Decodes the RSS feed from Windows-1255 encoding using
iconv-lite
. - Parses the RSS feed to extract new headlines.
- Sends new headlines to a Telegram chat with clickable links.
- Node.js installed on your machine.
- A Telegram bot token. You can get this by creating a bot on Telegram using BotFather.
- A Telegram chat ID where the bot will send the messages.
-
Clone the repository:
git clone https://github.com/einatsof/nodejs-rotter-scoops-telegram-bot.git cd nodejs-rotter-scoops-telegram-bot
-
Install the dependencies:
npm install
- Create a .env file with the following contents:
TOKEN=your-telegram-bot-token
CHAT_ID=your-telegram-chat-id
- Run the bot:
node app.js
TOKEN
: Your Telegram bot token.CHAT_ID
: The ID of the Telegram chat where the bot will send messages.INTERVAL
: (Optional) The polling interval in milliseconds (default is 60000, or 1 minute).