I'm looking for a little help with a twitch channel bot with keyword giveaways. this is the current setup:

on *:TEXT:Keyword:#:{
inc -u600 %spam. [ $+ [ $nick ] ]
if (%spam. [ $+ [ $nick ] ] >= 4) {
write Keyword.txt $nick
msg $chan /timeout $nick 300
/raw PRIVMSG #jtv :/w $nick Whatever
halt
}
}

And I have to manually enter the keyword to be searched for to prevent users from over spamming it.

What I'm looking for is for the bot to see a keyword typed in chat by multiple users 20 lines in a row, write it to a variable, and insert where I manually put the keyword. I sort of have an idea on how to do this but I'm kinda new to it.
Thanks anyone that can help!

Last edited by meesh; 12/09/17 12:52 AM.