Inspiration
I originally became interested in building a discord bot because of a quiz game I would play with friends on one of our servers. I wanted to automate the scoring for the game, but eventually I got sidetracked by the potential of the bot to listen to and respond to messages.
What it does
Morphobot scans messages sent in whatever server it is deployed to. Whenever it finds a message containing a word from its file list of inappropriate words, it deletes the message and replaces it with an edited version, alongside an admonition of the naughty offender. The bot cannot understand every possible swear combination or every euphemism, so it is less about moderating the quality of conversation and more about forcing my friends to get more creative with their swears. In addition, Morphobot has a handful of other commands. One notable command is the ability to respond to a message with the timestamp of when it received the message. Another command rolls dice, but the dice are weighted to always produce either the minimum or the maximum possible values.
How we built it
I started on the discord bot by joining the "A simple Discord bot with Mara" MLH workshop. I transferred those concepts to discord.js with the help of the Coding Train Youtube channel. I then built in new bot functionality by exploring the guides and documentation available on the discord.js website.
Challenges we ran into
I did not end up building functionality into the bot to store user information in a database. I was preoccupied with learning the Javascript language, so I did not also want to attempt SQL databasing.
Accomplishments that we're proud of
I made my friends laugh very hard.
What we learned
I learned about how Javascript organizes and runs its code, and I gained more familiarity with Regex conventions.
What's next for MorphoBot
I hope to eventually incorporate the ability to track user data over time, so that I may implement my original idea for a game-scoring bot.
Built With
- discord
- discord.js
- node.js
Log in or sign up for Devpost to join the conversation.