Smile Bot v1
- 4 Devlogs
- 2 Total hours
This bot makes you smile....or even laugh!
This bot makes you smile....or even laugh!
Feedback
Hey PrakstheBruce,
Awesome project! I'd love to see what you make in the future!
For any other questions, DM @stunt or create a ticket in Slack—#ask-the-shipwrights.
Shipwright walkthrough
Feedback
I have to reject this project because the banner is not a picture of your project in action, and it is AI-generated. For your banner it could instead be the output of one of the commands. Correct this, reship, and we are happy to take another look.
If you have any questions, DM @stunt on Slack or ask in #ask-the-shipwrights.
Shipwright walkthrough
🛠️ Smile Bot — Fixing the Broken Compliment Feature
Heyyyy! After shipping Smile Bot I noticed something embarrassing. 😂
The /smile-bot-compliment command wasn’t actually working…..
Instead of returning a compliment, it kept responding:
“Couldn’t find a compliment right now.”
Soo.. What was happening?
The command depended on an external API: The API was throwing an error, which meant my bot’s fallback response was triggered every time.
The fix:
I realized I didn’t need an external API for something as simple as generating compliments.
Therefore, I replaced the API call with a local collection of compliments and randomly select one whenever the command is used: This means the feature no longer depends on a third-party API being online.
🚀 Deploying the fix
The interesting part was that the bot worked locally, but Slack was still showing the old error.
Turns out my Nest server was still running the previous version of index.js.
I pushed the fix to GitHub, pulled the latest commit onto Nest, restarted the systemd service, and tested it again in Slack.
And finally:
It worked!!!!!!!!!!!!! 🎉🍀🍀
📚 What I learned
This was a small bug, but it taught me an important lesson:
“A working local version doesn’t mean your deployed version has the same code.”
Debugging isn’t always about finding a complicated programming error it’s also about tracing the entire path: 🗿
Code → Git → Server → Process → User
Smile Bot is now a little more reliable than it was when I shipped it. ✨
Another bug squashed and Another lesson learned!!
Feedback
The project seem really cool, however, the compliment api don't seem to be valid. Please fix this before resubmitting, thank you!
Shipwright walkthrough
The BIIGESST and smallest mistake that I did 🫢🫢😭😭…. Guys, I Finally was Hyped Up that I completed my Slack Bot- Smile-Bot!!! BUT While trying to ship it, The Ship It Button was Greyed Out! I did not know what to do, when two of my bros @mr_kn5196❤️❤️ and @fsh 🍀🍀 Helped me out!! I was not a really big bug! I JUST PUT A “.git” EXTENSION IN MY GIT HUB URL!! THAT CAUSED THE ERROR! Hope you guys have a Great week ahead! And I WILL SOON POST UPDATES ON MY NEW “frictionless” project––“CodeAtlas!!”. Peace!!
Devlog #2 — Another Interesting Problem- After getting the basic Slack commands working, I started preparing the project for deployment. That introduced a completely different side of development that I hadn’t really dealt with before: Git, GitHub, SSH, environment variables, and servers. One of the first things I learned was why .env files shouldn’t be pushed to GitHub. My Slack tokens are required for the bot to work, but they’re also credentials that shouldn’t be sitting inside a public repository. I added .env to .gitignore and learned that deploying an application means recreating those environment variables securely on the server. Git also gave me a few headaches. My local repository and GitHub repository weren’t completely in sync, so my first push was rejected. Instead of forcing the push, I had to understand what Git was actually telling me and pull the remote changes before pushing again. Now I’m moving on to Hack Club Nest. The goal is to get SmileBot running on a real server instead of depending on my laptop and terminal being open. The interesting part of this project so far is that the Slack commands themselves weren’t the hardest part. Getting the entire development workflow around them working has taught me just as much. Next step: SSH into Nest, deploy SmileBot, and get it running 24/7.(P.S I just applied, waiting for approval!!)
My First and Useful Devlog(It would be helpful for ppl staring out.) Devlog #1 — Setting Up My SlackbotProject: I started setting up my development environment for the Stardance Slackbot challenge.I already had VS Code and Node.js installed, so I expected the setup to be pretty straightforward. I ran: “npm -v” but PowerShell returned an error saying that scripts were disabled on the system. Initially, I thought there was something wrong with my Node.js or npm installation. After looking into it, I realized that npm itself was installed correctly. The issue was that PowerShell’s execution policy was preventing the “npm” PowerShell script from running. Instead of changing a bunch of system settings, I switched the VS Code terminal from PowerShell to Command Prompt and tested it again: “node -v” &
“npm -v” Both commands worked!!! I was then able to continue with the project setup: “npm init -y”
“npm install @slack/bolt dotenv” What I learned-This was a small issue, but it was a useful reminder that debugging isn’t always about the code itself. Sometimes the problem is with the environment you’re running the code in. The important part was figuring out what was actually failing instead of immediately reinstalling Node.js or changing random settings. Now the development environment is ready, and I can move on to building the actual Slackbot. Next: Create the basic Slackbot and get it responding to messages.