Update on my shitty code.

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)
  • Like
Reactions: 1 person

Comments

@Futurdreamz I'm not good enough with c++ to make something like this in it. java was the first language I learned, so I'm pretty comfortable using it.
 
That I can understand, but I am NEVER letting Oracle onto my computer and I'd suggest you dot eh same if possible.
 

Blog entry information

Author
HamBone41801
Views
285
Comments
14
Last update

More entries in Personal Blogs

More entries from HamBone41801

Share this entry

General chit-chat
Help Users
  • Sicklyboy @ Sicklyboy:
    Mobile app is such absolute dogshit, I haven't used it in SO long
  • K3Nv2 @ K3Nv2:
    Yeah mobile versions better people don't think about how apps are just shrunken down websites
  • K3Nv2 @ K3Nv2:
    Could be the phone connection etc I've mostly been fine with the app
  • K3Nv2 @ K3Nv2:
    Regardless fuck bezos
    +1
  • Sicklyboy @ Sicklyboy:
    Agreed. Crazy how both seeking a job at Amazon, and subsequently quitting Amazon, are both some of the best decisions I've ever made
  • K3Nv2 @ K3Nv2:
    Did someone loose a leg? You're fired
  • K3Nv2 @ K3Nv2:
    Ffs 55gb patch for hogwarts legacy
  • SylverReZ @ SylverReZ:
    @K3Nv2, Teslas are prob running Windows XP to this day.
  • Sicklyboy @ Sicklyboy:
    sometimes I wonder where I went wrong and why I'm so dissatisfied with my life
  • Sicklyboy @ Sicklyboy:
    Then I find myself arguing with someone on reddit about how blatantly wrong their understanding of the USB Power Delivery specification is.
  • Sicklyboy @ Sicklyboy:
    At 1 AM.
  • Sicklyboy @ Sicklyboy:
    Where did I go wrong, again? 😕
  • SylverReZ @ SylverReZ:
    @Sicklyboy, What do you mean?
  • K3Nv2 @ K3Nv2:
    @Sicklyboy, always blame women
  • Veho @ Veho:
    Blame woke.
  • SylverReZ @ SylverReZ:
    Blame society.
  • K3Nv2 @ K3Nv2:
    Woke isn't part of society they woke up from it
    +1
  • Veho @ Veho:
    *spends years yelling "wake up sheeple"
    *acts shocked when they actually wake up
  • Veho @ Veho:
    Make up your mind.
  • K3Nv2 @ K3Nv2:
    You mean the government doesn't care? :(
  • Veho @ Veho:
    I have no idea what you're talking about.
  • K3Nv2 @ K3Nv2:
    The government
    SylverReZ @ SylverReZ: https://www.youtube.com/clip/Ugkx4pNi-wvHyf8vhDN0x06Wf8J7aIgx_Hdp