Learning before building really helped me do it ASAP. To make this, what I did was — spend my first 20 minutes understanding how Slack bots actually work before writing a single line of code or building it. The pieces turned out to be simpler than I feared: a Slack app created at api.slack.com, Socket Mode (the bot connects over WebSockets, so it needs no public URL or server), and two tokens — a bot token (xoxb-…) and an app-level token (xapp-…). Once that clicked, everything else was just wiring.
I built it in Node.js with Slack’s official Bolt framework. One command, node index.js, and Jarvis connects to the Hack Club workspace. Then I gave it a personality and some skills:
- Talk to it — mention @Jarvis or DM it and it replies with AI: concise, friendly, lightly witty
- It remembers — conversation history per thread, so it can actually follow along
- It reacts — every message gets a themed emoji reaction
- 4 slash commands — /jarvis-help, /jarvis-ping, /jarvis-catfact, /jarvis-joke
- An App Home tab — commands list, online status, and feedback buttons
The build wasn’t smooth the whole way, and the failures taught me more than the wins:
- My OpenAI key had zero credits — first AI reply was a sad 429 You have no credits. I switched to Gemini with a free Google AI Studio key, pointed the SDK at Google’s OpenAI-compatible endpoint, and used gemini-3.1-flash-lite, the cheapest model available to new accounts.
- Command collisions — every Slack bot shares the workspace’s slash-command namespace, so I prefixed everything with jarvis- to keep them unique.
- “The app did not respond” — my commands were registered in code but not in the app’s config on Slack’s side. Updating the manifest at api.slack.com and reinstalling the app fixed it. Classic config-vs-code mismatch.
- Repo hygiene — I renamed the entry file to index.js, deleted template leftovers, and squashed the git history into one clean “Initial commit”.
Staying alive 24/7: I cloned the repo onto Hack Club Nest, wrote a systemd service (restarts on crash and on reboot), and enabled it. Jarvis now stays online even with my laptop closed — plus an optional GitHub Action redeploys it on every push.
Quality check: 28 passing tests, lint and typecheck clean.
Jarvis is live in #bot-spam right now. Say hi — or try /jarvis-joke and watch it bomb on purpose.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.