
Torc Bot 2: The Refactor
Refactoring is important, but also difficult You ever create something with the best intentions of it being to standard and end up just winging it after you get started? Yeah, I did that with Torc Bot, the discord bot I created for the Torc.dev community. Originally slotted for just a summarization bot to help the community catch up with chats turned into a randomized grouping of features all jumbled into a 2k line single file bot. Originally I built out the summarization to use Groq AI llama model just to pull the last 100 messages from a channel and pass them to the AI model for summarization. Worked pretty well and was useful. Then came requests to add a weekly server summary so we could see what was discussed across all channels, then reminder functionality and some internal tools to help the Torc team. What started out as a simple single file discord bot started to morph into a giant mess of commands and services functions and utility functions that was getting hard to maintain an
Continue reading on Dev.to JavaScript
Opens in a new tab




