IRC Bot / MGC Chat Bot
Chat bots for online communities I was part of (2017 - 2019)

Java
Python

I think the majority of programmers attempted to create some kind of chatbot in their lifetime, and I am no exception here. As I am a bit of an old schooler in this area, I prefer IRC for group chatting with people I don't know personally over modern alternatives (like Discord). So my first bot was written with the Limnoria framework in Python and then ported to Java using the PircBotX framework. It wasn't too fancy, the basic commands were outputting ASCII art images stored in text files, parsing titles of HTTP links posted in the chatroom, or scanning RSS feed of local newspapers for news labeled as Breaking.

Then for some time, I was active on a vBulletin forum, which made use of the MGC Chatbox Evo plugin. There wasn't any developer API for this chatbox, so I resorted to the classic workaround - I examined the HTTP requests my browser was making when I sent a message (or edited/deleted one) via Network tab in developer tools. Then I created a regular user account for my bot and wrote script that authenticated with its credentials, periodically parsed the content of the chatbox and if the command was recognized (usually starting with "!"), it replied with an appropriate message. Functionality included tracking of the top posters, checking which administrators are in the game right now and even sending a notification when a new song was being played in the connected plug.dj room (to get this working I did a very dirty hack - I had JavaScript program with plug.dj API wrapper running, and upon detection of a song it wrote the song name to the text file from which the Python chatbot program read it - the poor man's message queue).

Lessons learned: How to scrape websites and mimic browser requests.

IRC Bot / MGC Chat Bot
Back to Projects