Skip to content

A Telegram bot that sends the Nasa's Astronomy Picture of the Day - APOD.

License

Notifications You must be signed in to change notification settings

murilovidal/apod-telegram-bot

Repository files navigation

GitHub issues GitHub forks GitHub stars GitHub license GitHub tag (latest by date)

APOD Telegram BOT

A Telegram bot that lets you receive the picture of the day or a random picture from the website Astronomy Picture of the Day.

About

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.

example

Prerequisites

  • axios: 0.21.1
  • dotenv: 8.2.0
  • telegraf: 4.0.3
  • typeorm: 0.2.30

Installation

  • 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

Testing

  • Start the testing database with docker-compose -f docker-compose.local.yml up

  • Run npm tests

Built With

  • 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).

Contact