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

35m 20s logged

built the bot on node + slack bolt in socket mode, so it talks to slack over a websocket with no public url. made the slack app from a manifest (auto-adds the slash commands, scopes, socket mode and the @mention event), generated the app-level and bot tokens, dropped them in a gitignored .env, and verified both against the slack api — “bot is running! now connected to slack”.then made it better: 11 commands now, all prefixed /sripin- so they don’t collide with other bots — ping, help, catfact, joke, quote, weather (wttr.in, no api key), define, 8ball, roll (NdM dice), flip, choose. every api call has a timeout and try/catch so a dead api can’t crash the bot, and a couple have offline fallbacks. fun commands post in-channel so everyone sees them. also fixed a real bug where the little http health endpoint would kill the whole bot if its port was taken, now it just disables itself — and added an error handler, clean sigint/sigterm shutdown, and a line that logs every incoming command. last step is deploying to hack club nest so it stays live 24/7 with my laptop closed.

0
11

Comments 0

No comments yet. Be the first!