Inspiration
- Over the course of the pandemic many of us used Discord while in person communication was hard. During this time, discord had gained a whole bunch of users and maunting chat got more and more difficult. The temporary solution was hiring more moderators but that was hard in large servers and even harder since not everyone was free at all times. Our solution was automating the whole task.
What it does
- A Multi-feature Discord Bot with of the main goals behind it being the ability to use Natural Language Processing to make conversing in Discord a safer and toxicity-free place, to actively check when questions related to the club are asked in chat, detecting these questions and answering them using a large dataset of information regarding the AI Club and finally a simple but efficient system of tracking member activity and displaying this data in a descriptive, easy-to-read and informative manner.
How we built it
- We first used the DiscordAPI to create a bot that actively checks each user input within a server. From there we used PerspectiveAPI which used Natural Language Processing to analyze each message and categorize it into 6 Categories (Severe Toxicity, Insult, Sexually Explicit, Profanity, Threat and Identity Attack), it then scores these messages on a scale of 0 to 1. Depending on the severity we’ve set a threshold to which the bot reacts and sends an alert contain information regarding the message to a custom channel that only moderators can see. After further moderation, the moderators can simply click a button to delete the message.
Challenges we ran into
- We had initially planned on making the bot fully automated but upon further consideration we discovered that the AI could not recognize context. Context is an important factor and we couldn’t fully rely on AI to make that decision. We then decided to flag the messages instead and have the moderators choose what to do. This reduced the need for active watching over chat. Another challenge was finding the right threshold to flag a message. We determined it by asking people whether or not potentially toxic messages were to be flagged.
Accomplishments that we're proud of
- We learnt most of how to do this project over the course of it. Actually learning how to use the Discord API and Perspective API within the span of this project.
What we learned
- We learned about Neural Networks, NLP, Project Management, the Discord API and MySQL.
What's next for Discord Moderation Bot
- We plan on adding an active question answering feature that detects when a question is asked in chat and whether or not that question is related to the MSU-AI Club. We then shall try answer that question from a large dataset containing information regarding the AI Club.
Built With
- discord
- mysql
- natural-language-processing
- perspectiveapi
- python
Log in or sign up for Devpost to join the conversation.