Morgann • I got bored

02.06.2020

Legacy Project
Discord Bot
Machine Learning/AI

Have you every felt like being a pain to your friends is just too much effort? Like there was a way to... automate insults?
A common issue, I know. With the world in lockdown and nothing better to do, my friends and I took to insulting one particular friend at every chance we got, which naturally led to the need for an automated system to handle it when we couldn't.

I set it up so whenever he would post a message to our group server on Discord (basically a voice and text-messaging service, for those who don't know), Morgann would automatically reply with a random insult from the list I gave him.
Already, this was a brilliant addition to our server, but I wanted to take this a step further. So, naturally, I added a bunch of features.

This all went well, however I had a couple of serious problems beginning to arise.
First of all, I was running the entirety of Morgann off of my computer, which meant that once I went to bed other people couldn't add insults or target people. And because nobody except me has a normal sleeping pattern, this became a problem.
Secondly, everything was stored inside a couple of .txt files on my hard drive, which meant it was very easy to corrupt data if something went wrong.
And lastly, I thought other people would want to have Morgann on their servers, and because all the save data was global, I had a serious privacy issue.

It was fairly obvious to me that Morgann was in dire need of a rework, and so I set about doing this. There was a couple of things I wanted to change the second time around, though:

To fix the biggest of these issues, saving, I decided to use a fully-fledged database to store everything, and eventually settled on an SQL database hosted through Heroku. Heroku is super neat because it hosts Morgann and the database, and I can access the database from on my computer, which meant I didn't have to guess how Morgann would function before uploading it. Also, it's free.

So with that sorted, I got to work on the new update, and less than a month later I had, for the most part completed, Morgann, with the following features added:

In the end, I learned quite a large amount from this project, actually.
Firstly, I pretty much learned Python over the course of about a month and a half to code Morgann, so that was nice. Additionally, I realised that quick project turnaround was a huge plus, and it allowed me to move onto other projects and experiment with different things.

So that's all there is to know about Morgann, really. He was never really intended to be much in the way of usefulness, but through him I learned a bunch and made my friends laugh, so I see that as a win-win.