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

Open comments for this post

27m 39s logged

Added a full help channel ticket system to pixorpheus, the bot I’m building for my YSWS program. The bot now automatically creates support tickets when someone posts in the help channel, notifies the support team in a private channel, and lets helpers resolve tickets with a button.

Started by reading through the nephthys source code (Hack Club’s open-source support bot) to understand how help channel bots work architecturally. Studied the ticket lifecycle, macro system, and database schema, then designed my own simplified version in JavaScript using Bolt.js, instead of using python like nephtys.
Set up a PostgreSQL database on Neon, wrote the schema, and connected it to the bot. Migrated hosting from Nest to Railway for proper always-on deployment with automatic GitHub deploys.
Ran into a few interesting issues along the way:

Socket Mode vs HTTP mode : Railway doesn’t support WebSocket-based Socket Mode, so I switched to standard HTTP and configured the Slack Event Subscriptions and Interactivity URLs accordingly
502 errors : Railway was routing traffic to the wrong port; fixed by explicitly setting PORT=3000
Duplicate events : Slack sometimes sends the same event twice, causing duplicate ticket inserts; handled with a ON CONFLICT DO NOTHING in the DB

Also added 11 slash commands (/pixl-ping, /pixl-stats, /pixl-roll, etc.) and a permission system so only helpers or support team members can resolve tickets.
Tools used

Claude & GitHub Copilot for looking up Bolt.js API docs and debugging error messages (~8 min total on Hackatime), mostly used to quickly read through unfamiliar error logs and API references rather than writing code

What’s next !!

Fix remaining edge cases where some messages don’t trigger ticket creation
Add stale ticket auto-close
Add a /pixl-ticket command to manually create tickets

0
2

Comments 0

No comments yet. Be the first!