Awesome
RSS to Telegram bot
A self-hosted telegram JavaScript/TypeScript bot that dumps posts from RSS feeds to a telegram chat. This script was created because all the third party services were unreliable.
The bot is publicly available on telegram: http://t.me/rss_t_bot
Docker
For the docker image go to: https://hub.docker.com/r/bokker/rss.to.telegram/
Installation
Dont forget to use the right node version. nvm use
or match the version in .nvmrc
npm install
cp .env.example .env
npm run dev
Dont forget to fill the .env file
A telegram bot is needed that the script will connect to. https://botsfortelegram.com/project/the-bot-father/ Running the script and typing in /help will reveal all the commands
- Clone the script
- Save and run
- Use the telegram commands to manage feeds
Known issues
There are no known issues but the telegram API has limitations on how many messages per chat you can receive
Docker
This container uses Redis and Bull for queuing the messages
docker create \
--name=rss.to.telegram \
-e TOKEN=chat:token \
-e DEBUG=false \
-e REDIS_HOST=127.0.0.1 \
-e REDIS_PORT=6379 \
-e REDIS_USER=default \
-e REDIS_PASSWORD=secret \
-e REDIS_MUTEX=random-value \
-v /path/to/host/config:/app/config \
--restart unless-stopped \
bokker/rss.to.telegram
Prisma
Prisma is used to manage SQLite structure changes and as a ORM
To create any change you need to do the following:
- Backup current database
- Alter the prisma.schema
npx prisma migrate dev -n migration-name
- test the migration on an old version of the database
npx prisma migrate deploy
- test the migration by having no database
npx prisma migrate deploy