Github: https://github.com/sstephen9999/bleep.gg
Try it out in our Discord: https://discord.gg/WHF8CNvR
Inspiration
41% of Americans have experienced some type of online harassment. (source) With how much we live online, that number is far too high. Many chats and message filters work on a blacklist of insults and slurs, not fully understanding the context of messages. bleep.gg keeps your online spaces free of hate speech, even where those hate speech filters are not in place.
What it does
bleep.gg uses a GPT-3 model to flag messages as hate speech. The Discord bot automatically reviews every message sent to a discord server and determines whether or not the message promotes hate speech. The Discord bot also has a support chatbot feature that can be added to any channel. This chatbot answers questions regarding hate speech with the members.
How we built it
bleep.gg was written in Node.js primarily with the help of the discord.js library. We used dotenv to store environmental variables and the openai to easily call API to the gpt-3 language model. We used slash commands to create commands for administrators to assign which channels the bleep chatbot can communicate with and stored the channel information on a MongoDB hosted by MongoDB atlas. bleep.gg was then hosted on Google App Engine. Our web app was created using next.js. We also created an API that other applications can call with their prompt to determine whether a piece of text has hate speech.
Challenges we ran into
The first challenge we ran into was creating the chatbot. We needed our chatbot to be specific: a question-answering bot designed to help stop hate speech. But, because it is an AI, how do we prevent it from answering other random questions or budging in random conversations between other members? These questions all revolve around the prompt for AI. We found that writing "question answering bot" instead of "chat bot" in the prompt prevented the bot from entering random conversations. We also found it was better to specifically mention for the bot does not answer questions unrelated to hate speech. After experimenting with the AI prompt, we finally found one that works best for us: "My name is Bleep. I am a highly intelligent and friendly question-answering bot designed to help stop hate speech. I only respond to questions related to hate speech. If you ask me a question that is not related to hate speech, I will respond with "?".\nQ: ${message.content}\nA:" Another challenge we ran into was assigning the Discord chatbot to a channel. We had to worry about identifying commands in chat, then checking to see if the messenger was an administrator, then setting the bot to only communicate with channels that the chatbot is assigned to, and finally storing the channel information so that the bot would still work if it gets shut down. Initially, we tried writing our own commands, but we had trouble performing checks making sure the messenger was an administrator. That was until we discovered slash commands. That made the job easier as it automatically was able to identify commands, pick up inputs, and check if the messenger was an administrator. We also discovered MongoDB, with an easy npm library for our node.js program to communicate with the database.
Accomplishments that we're proud of
We were able to develop both an incredibly polished brand as well as a seamless integration with Discord.
What we learned
This experience was eye-opening with regards to the wide array of web dev technologies available. The implementations into Discord were also a learning process.
What's next for bleep.gg
We hope to develop a Chrome extension with the API that we've developed. While we initially planned to make this extension, scrolling on most social media sites causes constant new updates, making it difficult to grab the contents of comments. We also hope to implement more customization in bleep's hate speech filters, to give the user more autonomy over their experience. In the future, bleep.gg will provide a safer, customizable online experience for all site.
Build with <3 by Brandon Kim, Stephen Shkeda, Philip Shkeda
Log in or sign up for Devpost to join the conversation.