command
module
Version:
v0.0.0-...-b1838e9
Opens a new window with list of versions in this module.
Published: Jun 28, 2024
License: MIT
Opens a new window with license information.
Imports: 16
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
apod-bot
A discord bot written in go that fetches and posts NASA's Astronomy Picture of the Day.
![](https://github.com/Alextopher/apod-bot/raw/b1838e96a1a0/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 <date>
- 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
-
Invite the bot to your server.
https://discord.com/api/oauth2/authorize?client_id=952282891910512663&permissions=18432&scope=applications.commands%20bot
-
Go to the channel you want APOD messages posted.
-
Call /schedule <hour UTC>
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:
APOD_TOKEN=<token>
DISCORD_TOKEN=<token>
# Optionally include an owner id to send certain events to.
OWNER_ID=<id>
To learn more about discord bot development, visit discord developers docs. To create a NASA API token visit api.nasa.gov.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
|
|
internal
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.