Lately i've seen many people come to the forums about twitch.tv and making custom chat bots. There have been many re-posts about this stuff so i decided to put
together a compilation of twitch.tv basics and scripts.
Please forgive me for any mistakes i make, i am fairly new at this.
Another way to get started it to look through the help files. Go there before coming to the forums. IF you ask for something in the forums when it is in
the help files you may build up some bad reputation.
I highly suggest you watch craftingmotion's twitch mIRC bot tutorials https://www.youtube.com/playlist?list=PLwXgPZ0hHTbGQTCJ9EmagIB-iedB1V97v The basics: Here are some keys for this part:
1. the pound symbols(#) inndicate which channel this will be presented in. In this tut we will use just #, that means every channel (also applies to key 2)
2. putting $chan instead of # after "{ msg" will message to the channel the command was presented in. This may be better than making the command a channel only command
if you run your bot in multiple channels and all channels use this same command (with the same output)
on join: the most simple script, anyone who joins will be welcomed
on !*:join:#:{ msg $chan Welcome to the chat! }
You could add $nick in there so it add their [nickname]name to the message
on !*:join:#:{ msg $chan Welcome $nick to the chat! }
text commands:
These are simple starter commands, these are present in 99% of twitch.tv channels and are easy to learn (i say that because /indie doesn't include those in his bot)
on *:text:hi:#: { msg $chan welcome $nick to the livestream! }
this code will message the channel the command was said in:
I highly recommend a !commands command so people know what to say to the bot. I recommend making a pastebin account to post your commands and be able to edit the
paste.
on *:text:hi:#: { msg $chan Current commands for the bot are here -> http://pastebin.com/raw.php?i=kwrCgRuQ }
There are more advanced stuff you can put in the commands, putting $nick will show their username.
Moderator commands:
There may be some commands you want only moderators to use (this will come in handy when you get to more advanced scripts) the easiest way to make it mod-only is to
use this:
Putting this under the text event will make this a op(mod) only command. Another way to make it mod-only is this:
if
($nick !isop #) return
the !isop for this means is NOT moderator, and the return after it means stop executing the command, or halt.
Those are the basic commands
here are more advanced threads you should look at:
add/removing commands directly through chat:
http://bit.ly/mircADDremoveCOMMANDSbanning people for caps locking in the chat:
http://bit.ly/mircCAPSif a certain nickname says a command:
http://bit.ly/mircNICKpausing a script temporarily:
http://bit.ly/mircPAUSEChat log script:
on *:text:*:#: {
write chatlog.txt $nick $time(mmm-dd) $time(hh:nn:ss) $1-
}
points script:
http://bit.ly/mircPOINTSlink block (may be buggy):
http://bit.ly/mircLINKblocktime people out for using /me:
http://bit.ly/mircMEinstant strawpoll script:
http://bit.ly/mircSTRAWPOLLdisplay online moderators:
http://bit.ly/mircMODSrock paper scissors and roulette games:
http://bit.ly/mircRPSrouletteHope this helps everyone!