As teens in the 21st Century, we have experienced the advantages and disadvantages of being exposed to technology at a young age, however, nothing we faced compared to today's level technology exposure, with kids having access to apps like Tiktok, Youtube and Discord, that contain a large amount of mature content, and cyberbullying. It is impossible to eliminate children's access to technology, however, we can take steps to make it safer. As students, we use Discord everyday to work on projects, attend club meetings, and interact in various online communities, and we know that it is also the case for younger children. So, to help them navigate Discord safely, we developed MsgGuard, a discord bot to monitor inappropriate language with a website to educate children on cyber bullying and provide other resources to help them.

What it does

MsgGuard will censor swear words and other inappropriate words. Each time a user uses one of the prohibited words, the following steps will occur:

  1. The message will be deleted and MsgGuard will generate a message pinging the user in the server explaining that their message was deleted.
  2. MsgGuard will directly message the user and explain how their message was deleted once again. A link to this website will also be included for more information.
  3. The user will receive one strike each time they use such language. This will appear as a role (Strike I, Strike II, Strike III). Once the user hits "Strike III", they will be muted and will no longer be able to send messages.
  4. All deleted messages will be saved in a Mysql database.

How we built it

We developed the discord bot using node.js with the discord.js module, the mysql module, and the dotnev module. The bot checks messages against the list of censored words and executes code based on whether it finds a censored word. For the database, we used Mysql to record the message author's id, the message content, and the timestamp. For the web side, we used HTML, CSS, JS, and did additional research to find anti-cyber bullying resources. For the development of the bot logo, we used Clip Studio Paint to create an original artwork.

Challenges we ran into

We had fundamental javascript knowledge from school, however, we were all very new to Node.js and the modules. In additional, we only started learning about Discord bots in the past two weeks, so learning to use all the Discord.js commands, specifically everything surrounding roles. We found that Discord utilizes a role hierarchy system, which caused muting based on roles difficult, and we had to spend hours on the Discord.js documentation website. Furthermore, this project was the first time we utilized Mysql, we had no previous experiences, but were able to successfully create a server and database after hours of research.

Accomplishments that we're proud of

We are proud of the design of the website, the Mysql database we were able to create without previous Mysql knowledge, and the strike system for the Discord bot.

What we learned

We gained introductory knowledge into Mysql, learned about Node.js which we will be sure to utilize in future projects, and further improved our web development skills using HTML, CSS, and Javascript.

What's next for MsgGuard

In the future, we hope to further improve on the role system to make it more user friendly, give personalized educational resources based on the type of the language the message author used, and implement machine learning to detect more complex inappropriate language, and to be able to report messages, which will be evaluated by the admin and censored if the admin deemed it necessary.

Share this project: