I GOT BORED

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. But the world was in lockdown and I had nothing better to do (I say that as if I wasn't working on a game at the time). Anyways, my friends and I had an ongoing joke where we would insult a particular friend of ours at every chance we got, which naturally led to the need for a bot (of course) to do just that for us.

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.

Embedded Image Title

Morgann's ingenious insults in action. And who better to receive such a scathing remark than from Morgan Freeman himself.

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.


THE REWORK

Welcome to Technical Territory

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 for the most part completed Morgann, with the following features added:


WHAT I LEARNED

In the end, I learned quite a large amount from this project, actually.

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.