Its been quite a while since I last talked about that little twitch bot I created, and a lot has changed, so I figured I'd make an update post.
- The biggest change to take place is that I made the jump from python to java.
- For those who don't know, when using java's built in socket api, the program will freeze while it waits for input from the server. in python, I just made it wait for a second and then ping the server, but in the java version, I've implemented some time-sensitive features the wont work using that. Instead, I created a listener class that gets info from the server and then puts it into a queue to be used by the main class. (This works infinitely better than my python solution)
- I created a User class that that keeps track of every user's rank, warnings, "points", and whether or not they are watching your stream. (this is part of another feature that I'll talk about next). Users are added to a hashMap whenever they either say something in chat, or when their join message appears.
- The points feature adds 1 point every minute to every user while they are watching your stream. (I'm using it to create commands with cooldowns)