This repository scrappes life quotes from a website. Stores them in MongoDB. And finally, listening to request to your bot and finds relevant quote to send. You can also add this bot to a public chat.
Link to existing bot: https://t.me/LifeQuotesBot
- Register your bot at Telegram and get
API_KEY
- Create a MongoDB to store scrapped quotes
- Clone the repo
- Add these variables to your
.env
file:
TELEGRAM_QUOTE_BOT_APP_TOKEN=...
TELEGRAM_QUOTE_BOT_APP_USERNAME=...
TELEGRAM_QUOTE_BOT_APP_PASSWORD=...
TELEGRAM_QUOTE_BOT_APP_DB=...
- Run
npm run scrape
to scrape and save the qoutes - Run
npm run bot
to start listening on messages to your bot withTELEGRAM_QUOTE_BOT_APP_TOKEN
. Alternatively, you can create a Docker image and run container on your PC or services like AWS ECS
- /byword text => Will send you a random quote that contains text
- /love => /byword любовь
- /friendship => /byword друж
- /meaningful => /byword жизнь
- /man => /byword мужчины
- /woman => /byword женщины