An open API service indexing awesome lists of open source software.

https://github.com/alextopher/apod-bot

A Discord bot sends daily NASA astronomy picture of the day
https://github.com/alextopher/apod-bot

Last synced: 7 months ago
JSON representation

A Discord bot sends daily NASA astronomy picture of the day

Awesome Lists containing this project

README

          

# apod-bot

A discord bot written in [go](https://go.dev/) that fetches and posts NASA's [Astronomy Picture of the Day](https://apod.nasa.gov/apod/).

![:O](./example.png)

## Features

- Scheduled posting with `/schedule` and `/stop`
- Manually posting today's picture with `/today`
- Post a random picture with `/random`
- Relive a previous APOD picture with `/specific `
- Get more information with `/explanation`
- Astronomy Picture of the Day API calls are cached
- Today's picture is saved in memory for a faster roundtrip

## Usage

1. Invite the bot to your server.

2. Go to the channel you want APOD messages posted.

3. Call `/schedule ` with the hour you want APOD messages to be sent.

I do keep some metrics of the bot usage. Including but not limited to server names,
channel ids, and command usage. Feel free to self-host it instead!

## Development

`APOD_TOKEN` and `DISCORD_TOKEN` are required as environment variables. These are set in a `.env` file like so:

```text
APOD_TOKEN=
DISCORD_TOKEN=

# Optionally include an owner id to send certain events to.
OWNER_ID=
```

To learn more about discord bot development, visit [discord developers docs](https://discord.com/developers/docs/intro). To create a NASA API token visit [api.nasa.gov](https://api.nasa.gov/index.html#authentication).