Access api.nasa.gov from your Discord server!
Implemented endpoints:
- APOD - Astronomy Picture of the Day
If you want to add this bot to your Discord server, click here.
If you want to host your own instance of the bot:
$ npm install
$ npm run build
$ NASABOT_TOKEN=<bot_token> API_KEY=<api_key> node build.bot.js
There is an optional environment variable APOD_CHANNEL
. This specifies the channel id
that the bot will automatically post the Astronomy Picture of the Day to at 5am (bot
time).
Example:
./nasa apod
NGC 1360: The Robin's Egg Nebula by Dong Liang
This pretty nebula lies some 1,500 light-years away, its shape and color in this
telescopic view reminiscent of a robin's egg. The cosmic cloud spans about 3
light-years, nestled securely within the boundaries of the southern constellation
Fornax. Recognized as a planetary nebula, egg-shaped NGC 1360 doesn't represent a
beginning though. Instead it corresponds to a brief and final phase in the evolution of
an aging star. In fact, visible at the center of the nebula, the central star of NGC
1360 is known to be a binary star system likely consisting of two evolved white dwarf
stars, less massive but much hotter than the Sun. Their intense and otherwise invisible
ultraviolet radiation has stripped away electrons from the atoms in their mutually
surrounding gaseous shroud. The predominant blue-green hue of NGC 1360 seen here is the
strong emission produced as electrons recombine with doubly ionized oxygen atoms.
Feel free to put up a PR! There are a number of endpoints available at api.nasa.gov that the bot could utilize.
In order to emulate the pipeline locally, you will need to:
$ npm install --save-dev