Discord Bot (SpudBot)

Date

2022 - Present

Technology

Description

In 2021, I joined a local Discord server that hosted events in Philadelphia. I was looking for a place to hang out and make friends after moving into the city, and the community was a great fit. I quickly became a regular, and eventually an administrator.

Starting later in 2022 the server had experienced rapid growth and the existing Discord bots were no longer able to meet the demands of the community. I was asked to help with the existing bots, and eventually I decided to write my own from scratch.

Initially I had wrote the bot in PHP to accomplish the simple tasks we needed at first. As the community continued to grow, I decided to rewrite the bot and utilize existing community frameworks to release a fully open-source version. I named it SpudBot after my username, and it's currently in use on Discordelphia.

The bot performs functions such as tracking user comments in real-time for moderation and role application, providing a custom command system including allowing users to verify each other, enhancing native Discord forum functionality to provide a better UX, and providing a custom event system for the community to use. SpudBot is built to function similarly to a plugin system, allowing other developers to quickly extend its functionality. Templating was later added to allow for dynamic commands and better formatting of responses.

A later upgrade was performed to migrate PHP to PHP 8.3, this required the usage of the new DiscordPHP library which was still under development. I decided to split the codebase and migrate the database to an API system, this allowed for the backend portion of the bot to be built to be more stable and have less interference on client upgrades. The API was built using Laravel and the database was migrated to PostgreSQL.

Links