Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Introduction

This is my discord chatbot project written in Python3 as part of the year 1 tasks using Discord.py. If you'd like to check out the code, please click on the "View on Github" button above.

Features

  • Roll a dice! Dices available: D4 / D6 / D8 / D10 / D100 / D12 / D20 / D∞
  • Have the bot tell a joke. It's funny, I promise!
  • Image manipulation! Crop out a friend's profile picture over a chicken body!
  • Music player. It's kind of mandatory in 2018, so here you go.
  • Looking for Group feature. Automagically create temporary parties & voice channels for your favorite games.
  • Ultra super secret dev commands! For admins with a good sense of humor.
  • Natural Language interpreter! Talk casually with the bot and have it say totally unrelated things.
  • Ever changing 'Playing..' status.
  • And more!

Dice Example

Dice

Joke Example

Joke

The Journey

"What started out as a simple university year 1 chatbot project turned out to be one of the most popular discord bots out there". That would the opening line if it were true. While it is true that this discord bot started as a chatbot project, right from the beginning I wanted to have a long lasting piece of software, not just get marked, get a grade and completely forget about it. I wanted to make a bot that would have a bunch of functionalities that would prove to be both useful and entertaining for its users. To be honest, I think I’m on the right path, having designed the bot with the discord community in mind while still bearing the marking criteria in mind, I am confident that with a little bit more polish I could very well get the bot running and publish it to the people.

Design

Having worked on the bot for about 4 weeks, I have already went through 1 complete rewrite of the code, a total restructure of the filesystem and successfully implemented 26 working commands with a variety of functions. From simply rolling a dice to organising parties with temporary voice & text channels to playing music YouTube to just having the bot tell a lame joke, or as the project “chatbot” theme suggests, natural language interpretation. For features like the YouTube integration where I’m using the youtube_dl solution to get the videos from YouTube and FFMPEG to stream the audio to voice channel the bot is connected to, I’m only going to need to polish them so that they have a good scalability in case the bot actually gets popular and will have to handle big amounts of data at a time.

Past

For the past 4 years I’ve mainly programmed in C++ without the use of any libraries so I could say I have some considerable algorithmic knowledge by having to learn all sorts of stuff and rewriting, adapting and optimising them each time I needed them. A few examples would probably be the classic sorting algorithms (Bubble, Insertion, Merge, Quicksort), Greedy, Divide Et Impera, BFS, DFS, Lee, and many unnamed others. I’ve also dabbled a bit into language learning and tried getting into Lua, C#, Java, JavaScript & Ruby, so when it came down to learning Python, it was a piece of cake.

The Teamwork Experience

At the end of the day, this was a team project, and as such we have set up a few ways of working and communicating together – a discord server for the team where we discuss, ask for help from fellow team mates and test out our bots and an azure dev ops team where we managed our work with weekly sprints.

Image

We’ve also estimated the time & effort for each task using the Planning Poker technique. The only issue that we’ve encountered was that we weren’t exactly a real team. We did set up ways to communicate & work together, but nobody was really using them and everybody was just doing their own thing. Half the team didn’t even join the dev ops team, so in order to work like this, we’ve agreed we’ll just talk what we want to work on and have separate bots doing their own thing and then, at the end, we’d do a big merge of all our code and just have a big bot with every functionality we’ve come up with. However, fast-forward 4 weeks later and people didn’t really want to do that anymore because it’d just be bother and since for this whole time we’ve been graded individually there wasn’t really any point to merge our code so we just focused on our own presentations and here we are.

Retrospecitve

I feel like my design is working well. I have a handful of features for users to play around with and I am actively working on the bot to polish / implement new ones. However, I do believe that I could’ve done more, in a better way and faster. The rewrite was a big step, but it impaired some essential functions, like the music & role management. I could’ve probably managed my time better in order to re-implement the functions in concordance with the new filesystem. I also wished I would’ve spent more time working on adding even more features but at the same time, I’m still happy with the outcome and I’m looking forward to upgrading and maintaining the boy from now on.

Sources