ComStar is a Slack Bot that I built to learn more about the Slack API and the process of building bots. It was inspired by my time moderating a collection of IRC channels on EsperNet while I was in college. While I ended up only implementing a handful of commands I built the bot to be an extensible framework with new commands being straightforward to add.
I built this project using Ruby and Ruby on Rails. Rails is probably too much for such a simple project, but it provided a scaffold for the project that let me tinker with Slack rather than spend time on building up the underlying pieces of the application.
The application itself is a single controller that handles parsing commands and returning results to Slack. Each command is implemented as a model that contains the logic and validation required. New commands can be added by subclassing the root Command class and registering them with the controller. This separation of concerns allows commands to be unit tested easily and allows them to be added or removed without impacting other commands. The extensive Ruby standard library makes lots of commands very simple to implement.
I ended up only implementing a few commands for this project. I ended up stopping work after implementing a simple identification command. Slack does not have the same environment as IRC and there is less of a reason for the bots you'd find on IRC like Omnipresence. This could be a good starting point for a more robust and focused bot. I have toyed with the idea of introducing it as a knowledge sharing bot inside an engineering organization.