A Telegram bot that lets you receive the picture of the day or a random picture from the website Astronomy Picture of the Day.
This bot uses the NASA's Astronomy Picture of the Day API to send to user the image or video of the day and its respective explanation.
Use the commands /image
to retrieve the picture of the day or /random
to receive a random image from the NASA Astronomy Picture of the Day website.
- axios: 0.21.1
- dotenv: 8.2.0
- telegraf: 4.0.3
- typeorm: 0.2.30
- Clone the repository with command
git clone https://github.com/murilovidal/apod-telegram-bot
- Fill the
.env
with the variables needed for TypeORM and the Nasa's APOD API. Refer to.sample.env
or.env.test
for an example.
Run:
docker-compose up
-
Start the testing database with
docker-compose -f docker-compose.local.yml up
-
Run
npm tests
- Telegraf - Telegraf is a library that makes it simple for you to develop your own Telegram bots using JavaScript or TypeScript.
- NASA's APOD - Astronomy Picture of the Day API.
- Typeorm - TypeORM is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo, and Electron platforms and can be used with TypeScript and JavaScript (ES5, ES6, ES7, ES8).