ScrubBot is a Discord bot I’ve been making for ScrubLords, a small server I’m in with some college friends. I’ve made a few bots before, but this has turned out to be quite different from them. I suppose that’s why I’ve decided to write about it, it feels meaningful. ScrubBot was started with a purpose.
Friday Night Gaming
In ScrubLords, we tend to get together every Friday for some games. More than a handful of times, though, we’d end up scrambling last minute figuring out who was actually available to play and what we wanted to play. While we could have just started planning ahead in chat, I was bored, and so I started working on the bot. I didn’t want to make some bot that did a million things, I just wanted it to cover the one use case, setting up gaming events.
It took me about three days to write up everything in my original plan. ScrubBot is written in Python, and uses the discord.py library. Having done this before, it didn’t take terribly long to get something up and running. However, my other bots were designed for one-off commands, and did not need to save any state. For running the database, I decided to use Heroku. I’ve never used one of these services for hosting web applications, and it was the first one that seemed a good fit (though after I started, I found some alternatives that may have been better).
Now, in our server, we could create events or join existing ones. The host could do a few extra things, and the bot would grab some info about the chosen game. It handled everything we needed it to, and it felt great to essentially have a software product with users, even if it was just the people in a small server.
Improving the Experience
After a while, it became obvious that the user experience with ScrubBot needed to be improved. When someone created an event, the bot would send out a message with the embed for event. Then, just because people talk in Discord, that embed message would go further and further up in the history. When you wanted a friend to join your event, you’d have to find the message to get the event ID, which your friend would then use in the join command. This started to become a bit tedious the more events we hosted. Here’s the old embed message.
So I updated it, and while I don’t think it’s perfect, it was cool to have this experience where I have something out in the wild that needs to evolve to meet user needs. You’ll notice that that is a feeling stretching over all of this. I haven’t made very many things that are used beyond my own computer.
Now, when a user creates an event, the embed message is still sent, but is put into a channel designated for only events on the server. This channel is expected to be set up for only the bot to be able talk in it. Joining and leaving the event was transitioned to being reaction-based, requiring the player to hit the check mark emote on the event message. Since all of the active events are in the restricted channel, they shouldn’t be buried, and this becomes a much easier experience for everyone involved. Here’s the new embed message.
The Future of ScrubBot
As I said, I don’t think ScrubBot is perfect. I think there’s more to do, both from personal observations and from requests from my friends! I’ll probably keep writing about it here as it expands, as I’m sure it will. For the most part, I think it will continue to serve as a more personal bot, and so if there’s something our server needs, it’s likely I’ll add it to ScrubBot.