So, I've been trying to make this script be a bit more useful for me. I have been planning to use twitchemotes.com's API API to save all the data to a txt file, but then I found this https://twitchemotes.com/filters/global

I've got the list saved to a text file for now, and I am planning to have a !refreshemotes script to resave them), but I'm struggling to get the script to read from the file so that command will come later on.


Code:
ON @*:TEXT:*:#: {
  if ($nick !isop #) {
    if ( $regex($1-,/$read(emotes.txt)/g) >= 5 ) {
      msg # Stop spamming emotes, $nick $+ !
      msg # .timeout $nick 120
    }
  }
}


I thought simply reading from the file would scan the whole thing. Yeahh.. No....

Would someone mind showing me what I'm doing wrong? My main concern when I do get this working is that there are a LOT of emotes. This list only contains the global emotes. I will be saving a list of subemotes, not sure how to have it scan both files at the same time, or if it will crash.