A Brief History of My Discord Bots

A chronological overview of the development of my discord bots

🧑‍💻

Written by Josh Humphriss

🗓️

Posted: 16 Feb 2023

🗓️

Modified: 01 Oct 2024

⏱️

12 min read

👁️

501 views

Introduction

Back in December 2017 when the project began, the project only comprised of only a single bot, SmileyBot. This gained lots of features, which had to be split up into many categories and modules. However, it felt like there was a bit too much for a single bot, so they were split into 3 bots (with economy left out, pending a rewrite) in September 2018. It later became evident this rewrite would not happen, so Economy was re-released in the same state it was previously. This leads to the 4 bots that are available today: Kernel, Spectral, PokéVenture and Economy.

In this article I am going to give a brief overview of all of the bots. Later, I hope to do a more in-depth analysis of individual bots.

Pre-SmileyBot

Surprisingly, my discord bot development did not begin with SmileyBot. In fact, my first bot development (if you could call it that) involved working with custom commands on Blargbot. I've always loved using discord bots and being able to make commands in an easily accessible manner was amazing. I made various systems for my server, SmileyDiscord, including a currency, quiz system, slot machine and various other fun and utility commands. Many of these have later been integrated into SmileyBot. I don't know whether I would've still chosen to develop a bot without Blargbot, but Blargbot was certainly a part of where the bots are today.

Early Stages

I sometimes look back at the early changelog posts and just think "wow, development was quick back then". I'd spend a whole day programming and end up with multiple different features. It only took me 1 day to implement pokemon battles, and that was a long time. I developed everything as quickly as possible without thinking too much about the code - as long as it worked, I was happy. This stage was so much fun. Obviously, this did have implications when I had to maintain this code, but it was very fun at the time.

This project was ultimately the project in which I learned to code. Needless to say, the initial code I wrote was rubbish. While most of it has been rewritten, some still remains in the code to this day.

I chose Python because I had learnt a bit of Python 2 and it seemed easy. I also considered JavaScript, but ultimately concluded Python was the better choice (with hindsight, I still think this was the best choice). After getting everything set up, I was now sat in front of the Python IDLE and Google, and I started making a bot.

It Started With... Giveaways?

The very first command, as you might expect, was 8ball. However this was very quickly followed by many different features. The first major feature was actually giveaways. One of the reasons I decided to make the bot was that I wanted to improve on the features offered by GiveawayBot, which was (and still is) in hundreds of thousands of servers. I thought I could do it better, and in fact, within a few days, I had. I made essentially the same thing but changed various different things that annoyed me. This was the first genuinely useful feature that innovated in the space to bring something new. After this point, I felt like I wasn't just learning to code, and could actually make stuff that nobody else has made before.

Giveaways were responsible for much of the early growth, including one notable period when GiveawayBot was down. While giveaways are such a minor part of the bot today, they were where it all started

Early Timeline

A quick timeline highlighting some notable features created early on. I hope this highlights how quick early development was!

Date Features
4thBot is online (hosted on my laptop)
5th8ball done
11thBot added to DBL (now top.gg)
12thGiveaway command done; Kick, Ban, Hackban
14thAuctions
14thCharacter Lookup, Expression Calc (with critical security issue), Basic Notepad, Server Created
15thPokemon Battles (585 lines of code in 1 day...) (no, the code wasn't any good)
16thLots and lots of bug fixes for pokemon battles (1400 lines of code)
17thHosting on Heroku
18thDatabase set up and working
19thGiveaways survive restarts. Bug fixes. A lot of commands: ID, Word-by-word Stories, Pokemon Stats, Greet, Farewell, Autorole
20thCustom Reactions (including DRPG cooldown reminders), Sending Feedback, To-Do List; 2000 lines
21stStop & Reroll Giveaways (with Giveaway IDs), Self-Assignable Roles
22ndUpdate library version from 0.16 to 1.0; Split up into (not enough) separate files
[Christmas]
2ndPremium & Keys
3rdPrefix Changing
10thOwner-Only Conversations with People
13thA better changelog system

After this, there were cookies, polls, filter, revision quizzes, vote rewards and loads and loads of bug fixes. Yes, I created a lot of bugs...

From this point onwards, every changelog message is available to view with the .changelog command. I will only highlight a few particularly important milestones, but the full details of everything I have ever added is available to browse on all of the bots, along with version numbers for everything.

Economy

Mid-February, I began work on a gambling category, adding commands .bal, .pay, .bank and .flip. .rob is a particular highlight, a command that allows you to rob banks, which has remained basically unchanged since its initial design and creation. This would later become part of the "SmileyCoins update", which later became what is now the Economy bot.

Quick timeline (note we are in February 2018):

15thBalance, Pay, Bank, Flip
16thRoll, Slots, Reaction Events
19thRobbing Banks
25thProject shifts from a small gambling category to Economy

This is when the project really took off and the scope increased drastically. By the 1st of March, I had implemented:

I then spent quite a while implementing the majority of the update. In the meantime, I added various fairly simple features such as define and translate, as well as optimising giveaways significantly. On the 22nd March, pre-release #5 was released. At this point, the economy.py file had reached almost 6000 lines of code (and no, this didn't make me consider splitting it up)! This release contained:

Quite a lot, right! But it keeps going... Only one day later, activities were released, including:

On the day after I added kits. Then on the day after that I implemented emoji collections. Another day after that and potions were released, along with many other improvements. After adding hunting a few days later, it was time to add many items and do lots of polishing.

This takes us to the end of March 2018, just over a month after development started. Development did continue into early April, but then began to slow as I focused on other areas of the bot. I did work on it a bit more in the first half of June, and there were other times when I spent some time working on Economy.

While there were some notable additions, the module remained fairly stagnant for a while as I began to work on other areas of the bot. This reached over 11,000 lines of code.

Other Random Things...

While doing all this stuff with economy, I improved the prefix system (allowing for user-configurable and server-configurable prefixes), added trivia, embed colour customisation, as well as lots of other random commands (weather, youtube, face...). Towards the end of June, I added some more notable things:

Much of this year was spent simply improving existing features and adding lots of more minor things. This was very important and all of these small features added up to make SmileyBot a lot better.

In July, I added a permissions system for the bot, which allows customising exactly who can execute what, and where. It is very powerful and a very useful feature.

PokéVenture

In mid-2018 I began work on what was to become the PokéVenture bot. While pokemon battles were added very early on, that command involved a fixed set of pokemon and moves, with no progression. Now, the pokemon game allows you to travel around a custom-made map, collecting pokemon and fighting trainers. There are 151 pokemon with over 400 moves.

Unfortunately, it turns out I didn't really record the development process for this. Development was quite chaotic, with the pokemon battle code being particularly bad. To add the pokemon and moves, I created a partially automated system to grab some data and get me to input the rest. This took me several hours, as I painfully entered all of the details into my phone (but was much quicker than if I hadn't automated it at all!)

The Website

Around August 2018 is when I decided that the bot needs its own website. This took a while, and is still not very good, but you are welcome to view it at joshhumphriss.com/bots. I do not actively develop this website (and I like to think that I've improved in web development since...).

Finishing 2018

In early November 2018, guilds were added to Economy. This command released with 34 subcommands! Then, Economy was further improved by adding XP and challenges to complete. While economy has been in beta for a while, it is now ready to lose that label.

Throughout December I made many changes, including finish off pokemon battles (wild pokemon and trainers), reworking inventory commands, weather forecast improvements, logging and many more improvements.

The highlight of the month was definitely the advent calendar. In hindsight, I put way too much effort into this, making custom minigames for many of the flaps for only a few people to actually use it. However, it was lots of fun! A particular highlight was the detective minigame, where I designed a full murder mystery behind one of the flaps.

And as if this wasn't a great month already, on Christmas eve I decided to finally take Economy and Pokemon out of beta. This was the biggest milestone in the bot's history, and marked a moment where the bot had absolutely loads of independent features.

2019

Keeping up this momentum, I released the first major update on the 4th of January. This included many features for Moderation, including a very useful warnings system and a mute command (discord didn't have this feature back then...).

Development continued at a very good pace, with lots of features being added to the pokemon module, as a command to generate temporary private channels.

I then spent the next few weeks developing a major update to Pokemon that I am very proud of: The Transport Update. This update was transformational, making moving around the world interesting, rather than really boring. There is:

After this, there were still loads of new features. Lots of new pokemon trainers were added, trivia got two new modes, giveaways were further improved a lot and more.

In March, some major optimisations came to the Economy module. I may do a blog post that goes into exactly what I did but this had a transformational impact (I was storing items in a really stupid way beforehand).

Development continued at a decent pace, with lots of different improvements being added that I can't possibly go over. If you are interested to know more, do check out .changelog

Right at the end of July, another named update was released, the "Gems Update". This included an overhaul to the premium side of the game, including a premium currency, many things to buy in the gem shop and improved vote rewards. This was an important update as it allowed gems to be given to reward anything, whether that be voting, donating or from giveaways.

You haven't heard much about Economy in a while. It was the 7th of September 2019 when I decided to finally start this "Economy Balancing" update. This was a massive overhaul of the Economy game to hopefully make it fun. It began with a simple spreadsheet to balance items and then led to many new commands that would be really cool. Unfortunately, I spent too long in the planning phase and not enough time in implementation, so (spoiler alert) this rework was never actually finished.

After pausing for a holiday, I continued development in September as usual. Development was initially very quick but did somewhat slow. Nevertheless, the project was still very much in active development at this stage. The advent calendar was live again with some changes to finish off the year.

2020

While the year began with the introduction of horse races, the most significant feature was definitey the optimisations. Somehow, after staring at the same code for ages, I had not acknowledged that 3 database queries were being done for every single command, adding 90ms of latency to every command. I fixed this, and was astounded by the results - it even led to negative ping! This actually means that the bot's message would show up before the user's message to invoke the command. I still do not understand how that happened, and haven't experienced it recently.

The next major change was detaching Gambling from Economy. While it was the main motivation behind creating the game, it no longer seemed to fit and came to detract from the rest of the game. It was moved over to a separate, temporary currency which makes gambling more fun and in a controlled environment, with various achievements and other permanent rewards. While some users found this removed the point of gambling, most people found it was a good change.

After lots more stability improvements (and graph plotting!), I added a very feature-rich notes command. This allows creating and managing lots of different notes, sharing with other users and even adding images to them. I also added akinator which is fun :P

While development was certainly slower in 2020, I did still manage to continue adding new features. In mid-August, I decided to split up Utility and Fun into separate modules. This also came along with a bunch of super low effort commands in the Searches category, where I would just implement some random API into its own command. This was really rewarding as it's very quick to add new features. Unfortunately, towards the end of the year, development began to slow. I spent the majority of my time working on the economy rewrite (mostly planning).

Splitting the Bots

Towards the end of August 2020 I started working on splitting the bots, which was completed mid-September. SmileyBot was split into Kernel, Spectral and PokéVenture. Note that Economy was not released initially, as it was awaiting a rewrite.

I did this change for a few reasons. The main reason was that it improves discoverability, as each bot is more focused on what it is meant to do. However, that doesn't mean that the bots are narrow! Each of the bots have more features than most multipurpose bots do.

After getting everything working, I chose to invest a small amount of the money from donations into marketing. I hadn't yet invested anything into marketing, but I thought it would be a good moment to do so. This was great, and led to many people adding the bot. This gave me some momentum and motivation, which eventually led to me (finally) adding PvP battles to PokéVenture. However, I really should've done more marketing earlier on.

I then spent some time further improving the vote rewards and the gem shop to get everything working nicely with multiple bots. Note that while the bots are split up, they are designed to work together seamlessly still sharing a prefix, so the end user will not notice much of a change.

2021

At this point, development had really slowed. For a project which I was so passionate about for so long, this was surprising and sad at the same time. However, I did still manage to add some cool one-off features.

To start of the year, I made great improvements to PokéVenture. I added a new location: Mystery Mansion, with various daily challenges. I also added a tutorial to slowly introduce mechanics to new players. These features were very successful.

Music trivia is one of my favourite features that I've ever added. It's simply a guess-the-song minigame, but with many different modes and settings. It's a lot of fun, you should definitely check it out! This was added late January.

In March, I finally implemented the ping command properly to co-ordinate everything across all of the bots. This command is a joy to watch, so do try it out! You can find more about how this works in another blog post.

After adding various back-end features, I added blackjack in June. In July, I added gambling events. In August, I added a jackbox quiplash style minigame. And right at the end of the month, I re-introduced Economy as a separate bot as I was aware it was not going to be finished.

It's quite clear to see that I'm sadly losing interest in the project at this point, as this is actually the last official changelog post. Since then, I have been maintaining some things, fixing some bugs, but nothing particularly major. I've absolutely loved this project, but I think it's quite clear that it has come to an end. However, I am determined to keep it working forever as I think this is really important.

Stats & Milestones

Milestones

Here's some milestones that I have extracted from the announcements channel that you may find interesting:

4th December 2017Bot is available publicly
17th December 2017Bot is hosted on Heroku
14th May 2018100 servers
24th September 2018250 servers
6th October 201840,000 lines of code
1st December 2018300 servers
21st March 2019400 servers
21st July 2019500 servers
28th July 2019Bot is hosted on a VPS

Stats

You can view stats in the bot using .usage and .usagegraph. Here's some I've generated:

Kernel (note this includes SmileyBot):

Spectral:

PokéVenture:

You can also generate graphs for commands, guilds, votes, monthly votes, ping and daily active users using .usagegraph

Conclusion

Developing the discord bots has been such an amazing experience. Not only have I learnt to code, but I've brought lots of new features to Discord. Discord provided me a space where I was able to do (pretty much) whatever I wanted, and it was a great experience. I've learnt so much about design, marketing, listening to feedback and managing a project effectively. Thank you to everyone who has been a part of the community, whether that be for a short time or a long time, whether that be reporting bugs or supporting the project financially, this genuinely would not have been possible without all of you. I will ensure that the bots remain accessible forever, so while I don't actively develop them any more, feel free to check them out!

More About My Discord Bots

I've also written articles about:

Feel free to check them out if you're interested!