Inspiration
Initially, when the pandemic started, we experienced an uptake in competitive programming. Since more people got access to computers, many people had easy access to competitive programming resources. Specifically, the Don Mills Online Judge (DMOJ), since, in Canada, it is considered the primary website for practicing computer science problems to prepare for contests. However, after the initial uptake in new DMOJ accounts and increase in activity, people started dropping out as they were losing interest due to the lack of fun and competition involved. To help being back interest into competitive programming we came up with the idea of DMOJ BOT. Many competitive computer science students are very active on discord, so what better way to encourage practicing than having it right there on the most popular social media platform? When we began this project, we had two goals in mind: first, to have competitiveness by allowing leader-boards and profile stats, and second, to add some fun and competitiveness.
What it does
Simply put, DMOJ BOT is a discord bot made to make competitive programming more fun. There are many different functionalities that it can do; once you've connected to your DMOJ profile, we're able to display your profile stats, display different kinds of leaderboards, and even create graphs to demonstrate your progress. Of course, we can also get a random problem for you to work on, based on different search parameters. In addition, we have a "daily challenge" for each user: based on your previous completed problems, we find and recommend which is just a little bit harder than your hardest completed questions. By doing this, you're able to build up a streak, compare with friends, and improve in the meantime. Of course, we also have our own little twist as well. An extra feature in this discord bot is the ability to duel others. You're able to challenge someone to a duel, and if accepted, we find a relatively easier problem that both users have not solved before. Whoever gets it done faster wins!
How we built it
Using discord APIs (and many YouTube tutorials) we were able to successfully create our bot on repl.it. We also used DMOJ API to get crucial information on DMOJ profiles. Using these two APIs, combined with the repl.it database, we had everything we needed. We started out with simply responding to messages, then we got into finding your profile stats, eventually working our way to searching for unsolved problems. Finally, it was time for the 'fun' part, which was adding in the daily challenges, epic programming duels, and fixing the remaining bugs so that our DMOJ bot would be ready.
Challenges we ran into
Coding in repl.it was not the best decision. We were constantly challenged by its limitations, forcing us to adapt to what repl.it could handle. For example, while creating daily challenges, we ran into problems with the repl.it database and datetime objects. So, to fix this problem, we had to come up with a creative way to store the current date. Many of our group members have never created a discord bot before or used APIs, so creating a project involving both of these meant we had to invest a lot of time learning how to use them. Creating a graph was also very difficult as we had to pull a lot of information to create an accurate graph and draw it.
Accomplishments that we're proud of
Our bot worked! We took a big risk, choosing to do a project on not one but two areas that we very new to our group members. Honestly, we were pretty surprised with ourselves that we managed to pull it out. In such a short time, we're proud to have created a function bot which can do so many things! We're also proud of the teamwork, adaptation, and bug-fixing skills that we've picked up along the way.
What we learned
We learned how to adapt to the repl.it environment and how to use APIs well. We've learned how to create discord bots that respond to messages. We've learned how to create graphs, how to use databases, and how the discord and DMOJ API works. We've also learned how to organize such a long code. Less coding-related, however, we learned how to collaborate well in a team as well as communicate, and we learned how to find reliable online resources since we didn't know much coming into this.
What's next for DMOJ Bot
We have many new exciting developments that we plan on making to our DMOJ Bot such as giving it the ability to choose random problems for you based on previous problems that you have solved. We also want our DMOJ Bot to help users improve on specific topics by starting off with simple problems of that problem type and gradually increase the difficulty. In sync with this, we also also plan on developing the bot so that not only does it show your rating graph, but it also shows improvement graphs of different types of problems you have done. We'd also like to add on tournaments in discord, using our dueling system, as well as creating a ranking and global matchmaking system (complete with MMR) for our users. We would also have it remind us of upcoming contests and providing problems in a similar style to those of the contest. Expanding on all of this, we could also add global or local tournaments with various prizes for those who place well. Since anyone can connect to any DMOJ Handle currently, we also hope to include a verification process when connecting to a DMOJ handle. Finally, for more convenience, we hope to give DMOJ Bot the ability to submit solutions for problems that it has recommended to users.
Built With
- discord.py
- dmoj-api
- python
- repl.it


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