A SpaceLinker that connects people with space β with support for NASA APIs and ISS tracking.
-
ISS Tracking: Determines the current position (ocean or land with country + city), speed, and altitude of the International Space Station (ISS).
-
NASA Astronomy Picture of the Day: Displays the current NASA Picture of the Day.
-
NASA Astronomy Picture of the Day with Info: Displays the current NASA Picture of the Day with its description.
-
Slash Commands: Supports modern Discord slash commands.
- Java 17+
- Maven
- A Discord bot token
- Multiple free APIs (e.g., NASA API, ISS tracking API)
-
Clone the repository:
git clone https://github.com/jantrw/SpaceLinker.git
cd SpaceLinker
-
Create a
config.properties
file with the API keys and Discord token:DISCORD_TOKEN=your_token_here
NASA_API_KEY=your_nasa_api_key_here
USERNAME=your_username
-
Build and run with Maven:
mvn package
java -jar target/SpaceLinker.jar
Command | Description |
---|---|
/iss |
Displays current ISS data |
/picture |
Shows the NASA Astronomy Picture of the Day |
/pictureinfo |
Shows the NASA Astronomy Picture with Info |
/prefix <new_prefix> |
Changes the command prefix |
Core classes of the bot:
DiscordBot.java
β Starts the bot and registers commands.BotListener.java
β Handles messages and slash commands.GuildDataManager.java
β Stores guild-specific data.ISSData.java
β Sends ISS data as a Discord message.NasaPictureOfTheDay.java
β Sends the NASA Astronomy Picture of the Day as a Discord message.JSONFetcherIss.java
β Fetches current ISS data from an API.JSONFetcherNasa.java
β Fetches the NASA Picture of the Day.
Contributions are welcome! Feel free to open an issue or submit a pull request.
If you encounter any issues, create a GitHub issue.
MIT License