Having relied on messaging platforms like Discord more than ever before to stay connected with friends during the pandemic, I became curious about bots—a very popular and powerful Discord feature that allows users to build and interact with unique functionalities that enhance the messaging experience.
Given that the Discord server I shared with many of my friends had quickly become overpopulated with pinned messages, we developed a need for a proper management system to safely and sustainably archive any memorable or important messages. Seeing this as an opportunity to become acquainted with Python, all the while creating something that would benefit my means of communication with others during a time of great uncertainty, I was motivated to learn how to create a Discord bot.
Archivist is a Discord bot that builds upon the conveniences of message pins. Messages pinned by Archivist are accessible, visible, and informative, but best of all, an unlimited amount can be sent to the read-only channels in which they’re saved (traditional pins are limited to 50 messages per channel). Messages are saved as information-rich embeds that contain the message itself, any attached media, and important contextual information such as the author, time, and originating channel.
The command scheme for Archivist is similarly convenient; #add[channel] [id]
directly adds a new message, #pin[channel] [id]
saves a previously existing message, and #info
explains what I just described.
My learning was initially supported by online tutorials outlining the basics of creating a Discord bot. With examples of simple bot functionalities such as responding to key words or specific phrases, I was able to gain a foundational understanding of the Python syntax and learn how the code was supposed to be structured. However, the archiving features I desired for Archivist were significantly more complex than the examples provided in the tutorials. As such, I made use of the official Discord.py library documentation as the primary resource for finding the Python functions I needed and learning how they could be used. I also browsed online forums to troubleshoot issues that I experienced and access more niche examples relevant to the functionalities I was developing.
Having a young mind in software development as a high-schooler, I ultimately opted to write the project on Replit, a browser-based IDE that would “just save stuff in the cloud.” Although far from industry standard, Replit served my needs extremely well given the scope of the project.
Evidently, building Archivist became an invaluable exercise in resourcefulness. Although now being well-versed in several languages, libraries, and frameworks, I continue to carry the same fundamental problem-solving skills in sourcing knowledge that I first acquired when I built Archivist.
In the end, Archivist was successful in pinning and saving new messages and different forms of media. Since its deployment, the bot has archived over 500 messages, and I still often benefit from its functionality today.