Sylva Bot

An Interactive IRC & Moderation Bot

This bot was created for a client, after which it was named, who streamed on Twitch - a rather popular video streaming platform. Most of the chat interface for this platform is run on IRC, so most of the internals deal directly with it, but I based this upon an Open Source bot called CoeBot. That means that all of the backend was already completed, but when Twitch updated their API, I ended up rewriting parts of it anyway.

The purpose of this bot was to promote and customize the twitch chat channel; CoeBot already provided all moderation functions for the most part, though I made many custom functions using those. I updated it daily at first, then at least weekly based upon feedback from the client. I proposed my own ideas, which he accepted or rejected, and I implemented anything he asked for. This bot ran on the client's computer since it used graphic elements that he had to broadcast to his stream, i.e. the greenscreen. There was time pressure on this project since we wanted to have the features usable immediately, so in some cases I had to create a temporary solution that was later fixed, such as the GameWisp authentication. I had to log and back-up important information such as 'coins', a virtual currency that people took somewhat seriously, and provide resets and triggers that can be used in case something went wrong - as well as error detection and correction when loading/saving.

The bot was capable of connecting to Twitch, Twitter, Discord, GameWisp, CleverBot, and even to my own webserver to obtain updates. The client stopped streaming at some point, and development halted, but it is fully functional.


Features

  • Interacted through Twitch's IRC protocol; included commands to entertain users and moderate the chat.
  • Interfaced with Discord, Twitter, Cleverbot, GameWisp, and my personal webserver for various uses
  • Included a "Green Screen", a custom image window and animation requested by the client that can be filtered to have a transparent background.
  • Contained complex chat-based functions, such as a raffle for users in the chat, and a full currency system that was used to limit user command execution
  • Used various techniques to prevent users from abusing commands, as well as keeping track of user access levels
  • Able to connect to a host server to automatically retrieve and apply program updates

Image or Gif Info

Challenges

  • Twitch's API - This was a challenge mostly because during the time I was working on this, they updated their API extensively. At some points my bot would not connect, or could not chat, and I had to dig through and eventually rewrote some of the the PircBot code, the bot that GeoBot is based on, which CoeBot is based on, which SylvaBot is based on. Whew. At other times, it would create random crashes that I eventually was able to fix, but it took many versions of debugging to find the cause and adjust to fit Twitch's unannounced API changes. And sometimes it wasn't the changes at all, but the API itself - when detecting a new follower or subscriber, the bot must load a page from the twitch API showing a full list. This is no problem, but Twitch's server then caches that request for up to 5 minutes, resulting in delayed responses. I eventually found a way around this by slightly changing the request size on each call to receive an un-cached page.
  • Design Challenges - Once more I ran into a few design challenges; CoeBot was intended to be able to join a large number of channels at once, but this bot was only intended for one. I initially rewrote some of CoeBot's functionality to enforce this, and refactored much of the connection procedure to reflect this. Eventually it was requested to have the bot join another channel for a few minutes at a time and enter a line in chat. Since I had already refactored all of this, I then had to work backwards and find a new way to get this to work - I ended up writing a separate function to jack into the CoeBot commands that I didn't refactor to accomplish this.
  • Live Environment - The bot was always used in a live environment with dozens of users interacting with it. All of its content was displayed on a stream or live chat, so any failures would be reflected live for all viewers to see. I had to perform thorough testing to ensure there were no issues, and the users always seemed to find new ways to break things anyway. I immediately resolved any bugs that appeared, and even created a system where I could remotely push an update in case of emergencies.

Support Center 3

This was created at my previous job when their database system was running too slowly. This was only for personal use; I was not considered a programmer in this position.
Built with: Java

Houston Game

A simple game in progress made with Unity; the idea is that one player controls a spaceship with basically no instrumentation, while the other player provides instructions over voice from the control center.
Built with: C#

Maptool Character Sheet

This is a character sheet designed for an online tabletop simulator. This is worth mentioning only because I managed to get a lot out of a very weak custom programming language that it uses, and it is very interactive.
Built with: MaptoolMacro and HTML/CSS