The inspiration for this bot came while talking on a public discord server and some people were harassing using such lewd language. Most of the people ignored it because it didn't concern them or they didn't had the time to deal with it and that's when we thought about making a bot. A bot would be able to constantly monitor the chatroom and can function without any bias whatsoever.
What it does
It calls out the user that harasses . The bot not only give a warning but after a certain threshold of violations(set to four currently), the offender get kicked out of the server.
How we built it
We collected a list of cuss or swear words as well as sexually humiliating words and check if the messages posted on discord by the user contains any such words. Most words we have selected are the general slangs used against women to discourage harassment .If any such word is found, we mark the user and asks him to mend his language otherwise let the message pass on directly without any restriction. We used the data structure Trie to increase the computational speed of checking if the message contains any such bad words. We build a Trie using these words and if message contains any such word, the bot would respond very fast to mark the message ie to scold the user. We used python codes and discord libraries to make sure smooth running of the bot.
Challenges we ran into
Since this was out first hackathon, we were pretty clueless most of the time about how to go about. We weren't even able to form a team for a long time on DevPost. Moreover, We came to know of this hackathon extremely late and the most formidable challenge we faced was time constraint. After a lot of brainstorming we decided upon this but none of us had any prior experience with making even a simple bot, let alone discord bot. Deciding upon which data structure to use was another roadblock we stumbled upon as storing it in list and checking each word against it was not good enough. We solved this by using the trie data structure. Even though our bot's library of offensive words cannot be said to be all inclusive( not even in just the English language ), it has over 1000 offensive words and we plan to slowly expand it, and then venture into including words from languages other than English too.
Accomplishments that we're proud of
This was our first time building a discord bot and we had to learn from the basics, so we are proud of the fact that we were able to deploy a fully functional discord bot that can be actually used in the servers and in such a short span of time.
What we learned
The first and foremost thing that we learned was how to function as a team, and keeping team ahead of ourselves. We further learnt more about how discord bots work, the oAuth2, how to make a bot come live on server and other similar technical stuffs we stumbled upon while making this. We learnt about the use of trie. On social level, we learned that how easily such offenders get away without any consequences because no one stands up to them.
What's next for the LANGUAGE! bot
There is a lot of possibilities that we see for this. We can extend this to even parse the images NSFW and flag them. Another feature that we plan to introduce is to give the admin of the server the flexibility to choose where to draw the line, as some server might be used for dating purposes and constant flagging of risque flirting can hamper the user experience.