A Little Bit About Us
We are a group of high school juniors with a passion for computer science and a drive to discover new things.
Purpose/Inspiration
Given the recent ongoing pandemic that greatly changed our day to day lives, we sought to solve a social issue that was exacerbated by it and that could be resolved using computational linguistics. We finally landed on a project to curb the rise of cyber bullying that was correlated with more and more people quarantining indoors and spending time online. We were inspired to use a Discord bot to moderate channels and protect its members.
What it does
Our bot provides a variety of moderation related commands for a server to utilize in order to keep its chats clean of toxicity and maintain a friendly environment. Upon checking over the messages, it deals with them accordingly depending on its toxicity and the history of similar toxicity from the user.
How we built it
One of our members, Andrew, already had experience with making a Discord bot, so we were able to begin coding with a bot that had no functionality yet. Sanjit and Aaron both took the task on learning how to use API's and TypeScript/JavaScript because this was our first time using them. All of us enjoyed learning along the way, and all of our functions were created by us three from scratch throughout the week with countless hours of work.
The main function of the bot is to take in messages that the users send and process it to determine its connotation. The messages sent in the server would be gathered and processed using the MeaningCloud API. This would provide us with a sentiment rating which we could use to assess whether or not the members are behaving well. Messages could have the potential to be deleted right away or give the user one of 5 strikes before being muted, depending on bot or human detection. The sentiment score would also be averaged for a lifetime score to rank the user in the server leaderboards. After implementing this main functionality, we added more commands to let moderators manually deal with delinquents as well as general monitoring of users.
Challenges we ran into
In general, we had many difficulties in our code regarding syntax issues and missing some key elements. The biggest hurdle we had to overcome was getting the weighted average to work and pulling and inputting data to and from our database. We spent a lot of time on this part, as it is the foundation for the other components in our project. Another challenge was implementing a leaderboard system with all of the users on a server. We struggled to properly gather all of the users and input them into the two dimensional data structure. A third challenge was trying to get the MeaningCloud API to connect with our code properly, as we had connectivity issues in the beginning.
Accomplishments that we're proud of
We are most proud of the sentiment score averaging calculations, because that is the heart of our project that many other functions are built upon. With math, a database, and fixing a lot of syntax issues (we had over 90 commits on GitHub), we were able to get a working weighted average algorithm that calculated the lifetime sentiment score of a user. We are also very proud of the Positivity Leaderboard that we have built. This exists to list the most positive members of the server in a leaderboard accessible to all. This would promote good behavior in the server and act as a possible incentive to push people in the correct direction.
What we learned
Throughout these past couple days, we learned a lot about the syntax and intricacies of Javascript, Typescript, the Discord.js API, and the MeaningCloud API. We learned how to incorporate the various functionality of the MeaningCloud API into our Discord bot to achieve what we envisioned. Not to mention, we also learned that the frustrating process of debugging is just a necessary and integral part of the journey.
What's next for Eclipse Discord Bot
A potentially ambitious goal that we have for the future is to include voice chat moderation as well. The bot could sit in voice calls and utilize a speech to text converter to allow moderation to exist in calls as well. This would ensure the safety of server members not only in text channels but also in voice channels.
Built With
- discord
- discord.js
- javascript
- meaningcloud
- node.js
- quick.db
- typescript


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