Inspiration
The internet is a fast-moving place where enormous amounts of interactions take place every day. Large community servers and/or platforms often come in contact with community demons which spread hate and unhealthy environments across these platforms. To counter this, we came up with the idea of a bot that could detect the said hateful content.
What it does
I-Spy is a bot that keeps a check on foul language, hate speech, and NSFW content on platforms like Discord and Twitter. A warning is dropped when our bot comes across similar content. I-spy is the one-stop solution to monitor your discord servers and Twitter handles against community demons and helps in content moderation.
How we built it
We used a publicly available Kaggle dataset (https://www.kaggle.com/vkrahul/twitter-hate-speech?select=train_E6oV3lV.csv ) for developing an NLP hate speech detection model. We used a basic Logistic Regression model for our purpose, which gave us an accuracy of about 85%. We also used numerous Python libraries/modules like stopwords and Tf-Idf vectorization for data cleaning.
We used the javascript library, ‘discord.js’ provided by Discord to program our Discord bot and Javascript Module Puppeteer for the Automation of our Twitter Bot.
Challenges we ran into
Some of the challenges we faced are the following:
No prior knowledge of Node.js Difficulty reading in discord commands. No prior knowledge of making API’s and their routing. Finding suitable datasets. We didn’t get the Twitter API due to stringent verification measures so we had to move forward with Puppeteer. Lack of documentation for Puppeteer. Puppeteer was made for an older version of Twitter.
Accomplishments that we're proud of
Despite having no experience with working in Node js, creating APIs and backend languages we managed to make a working prototype of both Discord and Twitter bot. We also made a fully functional NLP model for hate-speech detection with an accuracy of 85% as well as successfully fetched data through our Flask API
What we learned
How to make Discord and Twitter bots using javascript How to make an NLP model for hate speech detection How to use and make an API using Flask Node.js Puppeteer How to manage GitHub repositories and branches
What's next for I - Spy
Improve model accuracy (at least around 95%) Optimize the method to search for NSFW links Scan NSFW media shared from local system like screenshots or GIF’s (not in form of links) DM discord server owners/moderators etc directly regarding regular offenders Devise a system to regulate and report explicit nicknames used by community members Deploy our API and model so that other developers can use and improve our service. Get an official API from Twitter and use it instead of Puppeteer
Built With
- api
- bootstrap
- canva
- css3
- discord.js
- figma
- flask
- github
- html5
- javascript
- machine-learning
- node.js
- puppeteer
- python

Log in or sign up for Devpost to join the conversation.