Skip to content

Why I wrote Tyrbot

bigwheels16 edited this page Feb 10, 2025 · 3 revisions

These are two questions that I get often so I figured I'd write up the answers here for anyone who might be curious.

Why did I write Tyrbot?

I wanted a bot (really, a bot platform) that could be used to build many different types of bots on. Budabot is a great org bot, but it makes assumptions about being an org bot. Using Budabot for anything other than an orgbot meant writing and change a lot of code, even some of the core code. Tyrbot is written in a way that separates basic bot functions from orgbot and raidbot functions which makes it much easier if you want to use it to build a spam bot or a tower bot, for example.

Another big benefit is that modules can easily override core functionality without having to change any of the core files. This makes it possible to customize every aspect of the bot, while still making it easy to keep your bot up-to-date with the latest Tyrbot version (if you are unsure how to utilize this, hop in the Discord and we can assist you).

I also wanted to improve the way commands were handled in the core. This is done in two main ways with Tyrbot. First, command parameters are declarative so it makes it much easier and quicker to specify than writing regex. And secondly, because the command parameters are declared, the help info for each command can be automatically generated. This saves a LOT of time and effort when writing modules, and also ensures that the help text is never out of date.

Why did I choose Python?

I was looking for a language that was:

  • easy to read, even for non-coders
  • easy to write
  • could handle text processing efficiently
  • had support for threads
  • widely used

I considered Golang, and NodeJS, which both fit the criteria pretty well. However, I ultimately decided on Python due to its text handling support (most of what a bot does is process and produce text).

A big benefit of Python over PHP is that it takes about half as much code to write functionality in Tyrbot as it does to write the same functionality in Budabot. As a result, Tyrbot modules are both faster to write and easier to read. Admittedly, some of these improvements would exist in any new bot I wrote, regardless of the language. But in any case, I am happy with my decision to use Python.

-Tyrence