You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

1h 30m 57s logged

I finished the second command for my Slack bot:
/ss-shower-thought
This command gave the user a random shower thought from a collection of 100.
 
This actually took me about 3 hours 🫩
 
First I tried https://docs.nickf.me/projects/shower%20thoughts/:
I spent about 30 mins reading it, setting it up, and trying to fix the 404 error. But eventually find out that it wasn’t my fault, but that the GitHub repo, and the link were removed.
 
I spent about 20 mins coding something so that all of the thoughts pulled would be shown to the user at random, and before each user sees any duplicates, they will see all of the thoughts that were fetched first.
 
Then I tried https://rapidapi.com/inramanlabs/api/stapi-showerthoughts:
I spent about an hour:
Making an account and setting it up
Then ensured that the API and plan are free and will stop working if it exceeds limit, rather than requiring me to spend money.
Then I found out how to actually get the api key (it wasn’t like I am accustomed to, the Studio tab misled me)
Then I found out where to cancel my subscription, just in case (I didn’t want to end up paying any money)
Then I tried to code it myself, using AI to find out how to tackle the parts I didn’t understand
Then I got a 505 error, and I thought that it might be an issue on my end cuz surely an API on a big website isn’t actually down.
So then I started experimenting on the website and found a code snippet that works for Node.js, and I got the same error again, and I tried a few ways to fix it, which didn’t work. Then I used the test method on the website itself, which didn’t work, and realized the issue was probably on their end.
 
Then I tried pulling directly from Reddit:
I spent about an hour:
Trying to code something to fetch from Reddit (I found the URLs and stuff, it was perfect), but I got a 403 error because Reddit doesn’t allow random bots to access it
Then I read https://developers.reddit.com/docs just to realize that it’s for making a Reddit bot rather than fetching from Reddit
Then I watched a YouTube video and realized I’ll have to make an app on https://www.reddit.com/prefs/apps but when I tried to, it told me to go to https://support.reddithelp.com/hc/en-us/articles/42728983564564-Responsible-Builder-Policy and submit a request.
But, then I found out that, even after all this complicated set up, the token would expire every hour.
Hence, I decided to drop this, but if the request gets accepted, I might code an automatic refresh cycle for the token to keep working
 
Finally, I spent 20 mins on copying 100 shower thoughts from Reddit.
So uh do I need to give credits to Reddit, and if yes, where?

0
1

Comments 0

No comments yet. Be the first!