Making a Twitch bot, need help with a few things - 05/01/15 03:17 AM
I'm trying to make a Twitch bot but I don't really know much about programming. I'm confused on most of these things, so help would be much appreciated. One of the things that I want to do is prevent emote spam. This website has 2 JSONs, one of them for global Twitch emotes and another for subscriber emotes. How can I integrate these into a script so that when there are >=5 of these in a message, the user will be timed out? I also found this, but I don't know how to use it either and I'm not sure if it will help.
I also want to do an !uptime command which will make the bot say how long the stream has been running. I could do a timer that I start/stop manually, but that's slightly annoying. Is there an automatic way to do it? The Twitch API has a "created_at" parameter for streams, but I'm not sure if that's related to the uptime or not.
Lastly, how can I do prevention of spammed letters/symbols? For example, if I type something like "Hhhhjvugggyuvghgjghghvghgghhygfgghggg" into chat, the bot would time me out because of repeated letters. Likewise, if I spam too many symbols (anything that isn't A-Z or 0-9), I would also be timed out. I don't have much of a clue on this one because I'm not experienced at all...
Sorry for the very open-endedness of this question. Any help would be very appreciated, though.
I also want to do an !uptime command which will make the bot say how long the stream has been running. I could do a timer that I start/stop manually, but that's slightly annoying. Is there an automatic way to do it? The Twitch API has a "created_at" parameter for streams, but I'm not sure if that's related to the uptime or not.
Lastly, how can I do prevention of spammed letters/symbols? For example, if I type something like "Hhhhjvugggyuvghgjghghvghgghhygfgghggg" into chat, the bot would time me out because of repeated letters. Likewise, if I spam too many symbols (anything that isn't A-Z or 0-9), I would also be timed out. I don't have much of a clue on this one because I'm not experienced at all...
Sorry for the very open-endedness of this question. Any help would be very appreciated, though.