Developed for astronomy enthusiasts by a astronomy enthusiast, this code uses the reliable and understandable coding language, aoi.js, tailored for the simple user. With the power of javascript and discord.js, along with our remarkable APIs.
This code is designed for a Discord bot to track the current position of the International Space Station (ISS) within a Discord channel. The bot checks the APIs for updated data every minute. If any updates are found, it promptly posts them to the channel configured by the user in the index.js file.
- Tracks the International Space Station (ISS) every 1 minute and retrieves data such as longitude, latitude, and ISS visibility.
- Provides information about the country the ISS is flying over, including the flag, full name, and alpha-2 code.
- Allows users to specify notifications for a specific country, triggering a notification only when the ISS passes over that country.
In order to run the code, you need to fill in some variables. But, first and foremost, you'll need to add your Discord bot token, which can be found in the Discord Developer Portal.
Ensure that you also enable all the intents. If you prefer not to enable the intents, you can edit the index.js file to make the necessary changes. Once these variables are configured, the code will automatically utilize them as needed.
// The channel that you want to receive notifications
// Make sure bot has perms to send messages to this channel
application.variables({
channel: "CHANNEL ID HERE"}, "main")
// It will send a message when the bot finds and deliver new data
application.variables({
logs_channel: "CHANNEL ID HERE"}, "main")
// Change it back to "All Locations" for all locations | !! Case Sensitive !!
// It supports ONLY ISO 3166-1 alpha-2 codes
// https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
// Example: "US"
application.variables({
iss_filter: "All Locations"}, "main")
✔️ After adding the variable values in the fields above and your bot token, you can run the code by executing the index.js file as the main file.
During my testing, I didn't find any significant limitations, but there is one to note:
The bot checks for new data every 1 minute. If the International Space Station (ISS) passes over a country within this timeframe and less than a minute elapses before the next check, the bot may not announce it. While this doesn't happen very often, it's worth mentioning.
Expect me that I created the code, it couldn't be possible without our API providers. Even if one API provider stops working, this system is rendered useless.
- Source Code: github/atlasfyber
- ISS Tracking Information: https://wheretheiss.at
- Countries Information: https://restcountries.com/v3.1/all
Do you want to support me? I'm not asking for donations, but feel free to invite one of my bots (Horizon), which can be found on my profile.
© Atlas Development | Made with ❤️ by Atlas Dev Team.