mIRC Homepage
Posted By: judge2020 Getting started with a twitch.tv bot - 14/04/14 04:58 PM
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:
Click to reveal..

the most simple script, anyone who joins will be welcomed
Code:
 on !*:join:#:{ msg $chan Welcome to the chat! } 

You could add $nick in there so it add their [nickname]name to the message
Code:
 on !*:join:#:{ msg $chan Welcome $nick to the chat! } 

text commands:
Click to reveal..

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)
Code:
 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.
Code:
 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:
Click to reveal..

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:
Code:
 if ($nick isop) { 
Putting this under the text event will make this a op(mod) only command. Another way to make it mod-only is this:
Code:
 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 smile here are more advanced threads you should look at:
add/removing commands directly through chat:
http://bit.ly/mircADDremoveCOMMANDS
banning people for caps locking in the chat:
http://bit.ly/mircCAPS
if a certain nickname says a command:
http://bit.ly/mircNICK
pausing a script temporarily:
http://bit.ly/mircPAUSE
Chat log script:
Code:
 on *:text:*:#: {
  write chatlog.txt $nick $time(mmm-dd) $time(hh:nn:ss) $1-
} 

points script:
http://bit.ly/mircPOINTS
link block (may be buggy):
http://bit.ly/mircLINKblock
time people out for using /me:
http://bit.ly/mircME
instant strawpoll script:
http://bit.ly/mircSTRAWPOLL
display online moderators:
http://bit.ly/mircMODS
rock paper scissors and roulette games:
http://bit.ly/mircRPSroulette


Hope this helps everyone!



Posted By: judge2020 Re: Getting started with a twitch.tv bot - 14/04/14 05:03 PM
kinda hoping to get sticky :P
Posted By: judge2020 Re: Getting started with a twitch.tv bot - 17/04/14 07:18 PM
This is for others starting out, sorry for any confusion thinking i need elp with the links here
After watching all of the videos and quadruple checking every command the bot still does not execute any commands and I have no idea why.

Here is a command I have right now;
on *:TEXT:!CMD:#: { msg $chan Current command list is: !server , !Taco }


It should work but it does not, suggestions? The help didn't help at all either.
Posted By: keyeslol Re: Getting started with a twitch.tv bot - 31/12/15 04:35 PM
Originally Posted By: Greentails43

on *:TEXT:!CMD:#: { msg $chan Current command list is: !server , !Taco }


Works fine for me.
Posted By: nanito Re: Getting started with a twitch.tv bot - 31/12/15 08:44 PM
Don't forget if you want to try the command must be in other user account and no the bot in self.
Originally Posted By: keyeslol
Originally Posted By: Greentails43

on *:TEXT:!CMD:#: { msg $chan Current command list is: !server , !Taco }


Works fine for me.



I think it is the connection to the irc server or something maybe? I can type through it to the channel and everything but when I type the command (on a the not account or the streaming account) or when anyone does nothing happens.

It also doesn't show any other users in the channel other than its self.
Posted By: Dazuz Re: Getting started with a twitch.tv bot - 31/12/15 09:56 PM
Make sure it's in the "Remote" tab, try typing "//remote on | events on" and try putting it in its own file.
Originally Posted By: Dazuz
Make sure it's in the "Remote" tab, try typing "//remote on | events on" and try putting it in its own file.


All of the commands are in the remote tab as well.
Where would I put the "//remote on | events on" is that in the remote tab?
Posted By: Loki12583 Re: Getting started with a twitch.tv bot - 31/12/15 11:33 PM
No, you type that in the command line.
Posted By: OrFeAsGr Re: Getting started with a twitch.tv bot - 01/01/16 12:29 AM
Very nice work, the repeative posts are kinda annoying and meaningless. I have suggested that but noone really gave attention.
I'm currently making something simular these weeks.
http://humanity.ucoz.com/mircfaq.html
It's a series of questions i've seen a lot here.. not nessecerily twitch related cause idk the weird ircd they use.
Good work man! I hope the ops make it sticky!!
© mIRC Discussion Forums