My first slack bot!
- 2 Devlogs
- 1 Total hours
This bot isn't slacking off, it replies to messages 24/7!
This bot isn't slacking off, it replies to messages 24/7!
Spent way too long debugging why /miobot-latency wasn’t responding… only to realize the Slash Command registered on Slack’s dashboard had a completely different name than the one in my code. Two typos, zero communication, one very confused bot. 🤦 Classic case of “it’s not a bug, it’s a naming mismatch.” Fixed it, restarted the service, and now the bot replies instantly with the latency. Lesson learned: always double-check that your Slack command name matches exactly — Slack doesn’t do fuzzy matching!
But in my defense regarding my mistake, I wanted to quote Shakespeare
Today I finally got my Slack bot running 24/7 on a real Linux server — and it was NOT easy.The goal was simple: deploy my Node.js Slack bot on Hack Club’s Nest server using systemd so it stays alive forever, even when my laptop is off. What followed was a 2-hour debugging marathon.Everything that went wrong (and why):Pasted the systemd config file in nano and accidentally cut the first line [Unit] — Linux silently rejected the whole fileGot stuck in the systemd pager (those mysterious : symbols) and didn’t know to press q to exit — my next command turned into qsudo 😅VS Code focus switched back to my local Windows terminal without me noticing — suddenly sudo and nano didn’t exist because I was on PowerShellThe project folder was at /root/miobot_project but the service file pointed to /home/federico/miobot_project — which doesn’t existThe .env file had the tokens but the SLACK_APP_TOKEN was expired and giving invalid_authWhat I learned: Linux doesn’t hold your hand. Every error message means something specific. journalctl -u slackbot.service -n 30 became my best friend for reading crash logs.Final result: Active: active (running) 🟢 The bot is live, systemd restarts it automatically if it ever crashes, and it will survive server reboots. First project shipped on real infrastructure!