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
- Host: GitHub
- URL: https://github.com/alextopher/apod-bot
- Owner: Alextopher
- License: mit
- Created: 2022-03-12T22:35:12.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-12T00:13:17.000Z (about 1 year ago)
- Last Synced: 2025-06-05T07:03:18.186Z (8 months ago)
- Language: Go
- Homepage:
- Size: 402 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/).

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