Intro to the Komada Framework

Picture this: I’ve been helping people make their own bots for around 5 months. Helping them with code, learning new things, figuring out all the things that make bots tick. And to help me out in my task, I have this great little bot called “GuideBot” which had a couple helpful commands such as one pointing to my discord.js bot guide. But I started to realize that GuideBot wasn’t just a bot for a guide - the bot was the guide. I had coded it in a way that was easy to read and understand, so I pushed it to Github, started linking to it as a great example of a functional bot code.

Birth of a Framework

Since it was easy to follow, it was also easy to contribute to - people started sending their fixes and updates to the code, contributing to the wonderful thing that was about to be. But there was a problem: people started actually using the repository as a base for their own bots but since the code wasn’t built as a module, it was impossible to update easily. It was necessary to change GuideBot into something more… and to rename it. I’m not one to brag, but I feel “Komada” which means pieces in Croatian, is a pretty good name! And so, I figured out how to make it useable as a module, threw it on NPM, and this wonderful framework was born!

Contributors are Awesome

I am certainly not alone in my endeavour to make a great framework. In fact, the team of contributors that amassed over the last 7 months have done impressive work building upon the foundations that I layed out. And, while at the end of last year I devolved into a detached, depressive state, the team not only picked up the slack but went quite over the call of duty. At this point, it’s clear that I’m no longer in charge of the framework I started - which is a relief since I’m no longer able to work on it.

What is Komada?

Komada is a modular bot framework created for Discord.js bots. It’s completely “plug-n-play”, and doesn’t take much time to set up. Some features:

  • Completely Async/Await w/ super fast load times.
  • Fully-Customizable parts: Each part of the system can be overridden with your own code!
  • Per-server extendable configuration system
  • Customizable Command System with easy argument setup, reloading and downloading for live code changes
  • Monitors that watch every message to react to them (swear filters, spam protection, etc)
  • Inhibitors that prevents commands from running (such as permissions, blacklists, etc)
  • Internal functions accessible anywhere in your code

Why use a framework instead of making your bot from scratch? Because you’re going to run into all of the problems that we did while writing it. How do you handle permissions? The help system? What’s the best way to create a command handler? How do you handle events, messages that aren’t commands, blacklists, whitelists, etc etc etc. These problems are solved for you in the most meaningful manner which lets you concentrate on why you really want to make a bot: To actually make a bot! We leave the commands to you while providing all the basic amenities you’ll be glad you don’t have to deal with.

How to get it and use it

Since my background is in technical support and technical writing, it would be logical that the documentation is probably one of the best parts of Komada. Indeed, you can visit Komada.js.org to get all the information you need in order to install, setup and extend Komada. So get going! Go forth and make awesome bots for Discord!