Open comments for this post
better /weather command and a newly commented code!
So initally, my /gda-weather command only worked for Charlottesville (where I live), and only also in Fahrenheit (strictly inferior but sadly the only one I coherently understand). I started off today by doing some research into how to actually accomplish my goal of any city, any system. I actually ended up switching into a much better weather API that allowed me to tell the temperature by city. I am not particularly good at Javascript (for now), so I decided that the easiest way to have the difference in between Fahrenheit and Celsius was just to make a specifically Celsius version of the same /gda-weather command, /gda-celsius-weather. I know, so origional.
Open comments for this post
Final bug fixes, sorting API keys, and testing. A lot of this time was just me realizing that for API’s to work propperly, you actually have to use the API key that they require. This is my first time in Javascript and using API’s, so I was quite unaware of how they worked. However, they make a lot more sense now!
Open comments for this post
Changing spacefact into Spaceimage. Spacefact was the inital version, and was meant to give you a random spacefact. However, there are not many API’s that do this, and the one I found did not do it well. I did stumble across NASA’s APOD, and was quite intrigued. I then reverse-engineered their API for it (It was written in python) to work in Javascript. I then spent a while trying (and mostly failing) to display the image directly in slack. I eventually figured out not only how to display it using a block, but also how to make it appear in slack.
Open comments for this post
Other commands and testing bot in Slack. The other commands that I added in included /gda-8ball to give you magical predictions, /gda-weather, to give you the weather, and /gda-spacefact, to give you a random spacefact. Some of this time, as previously stated, was spent testing the bot commands in Slack. Some of them worked first try, but many had errors that I tried to figure out, including how to get the 8-ball to actually display anything besides [object Object] in Slack.
Open comments for this post
Set up tokens and first basic command using the guide because I am new to Javascript and this is my first Hack Club project.