Discord Bot as a Unified Management System in a Game

Check out the GitHub

One of my favorite games to start up when I want to just chill is RuneScape. You level up your skills by cutting trees, fishing, cooking, etc. There's an activity in the game that involves mining shooting stars, stars that fall randomly onto the ground. If you're lucky enough to find a fallen star, you can mine it for mining xp and stardust, which you can use to buy some cool things.

There's a small community that dedicates itself to finding these stars. Through crowdsourcing and collaboration, they find stars and track their statuses, whether they disappeared or not, what tier they're currently at, etc. They did a good job at self-organizing, and I saw an opportunity to help them tackle their biggest issues:

1. There was little persistency. Someone asks "any stars?" and someone else answers. A third person logs in, and since they don't have history to the chat, they ask again. This was something that happened all the time.


2. The persistency they did have was manual. The group made a Discord to kind of solve the first problem. But the maintenance of the data was all manual. They were crossing stars out when they disappeared and editing their messages when the stars changed tier.


Creating a bot

I gathered all the requirements from the members of the chat on what the bot should be able to do. Like for example, it should be able to "hold" a star - you don't want to immediately call a star if there's already a star out there to mine. The reason being that you want to save a star for later. The minimum viable product is shown below:


Last thoughts

This project was a cool learning experience for me. I learned a new technology: MongoDB. I enjoyed working with it; it's fun and a very flexible DB compared to the SQL-based ones. I went ahead with the industry standard and containerized my app with Docker. I'm even running it in the cloud! I used Google Compute Engine for hosting the container. It made me realize how robust cloud technology is and inspires me to get certified with Azure and AWS. Learning Kubernetes is also on the horizon.

I learned that software is a living breathing thing, and that I would want to make changes or updates to this codebase eventually. So I added a Continuous Integration pipeline based off of a cloudbuild.yaml file and other configurations. Whenever the main branch updates, the container is automatically rebuilt. Understanding the mechanics behind that and how it works was a good learning experience.

The biggest achievement in my eyes was being able to provide a needed service through my code. For a group of 150+ gamers to use my app regularly, and knowing that something I built made someone somewhere a little more productive, a little bit happier, a little better off: that's real value added.

Check out the GitHub