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.gitcd SpaceLinker -
Create a
config.propertiesfile with the API keys and Discord token:DISCORD_TOKEN=your_token_hereNASA_API_KEY=your_nasa_api_key_hereUSERNAME=your_username -
Build and run with Maven:
mvn packagejava -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



