mIRC Home    About    Download    Register    News    Help

Print Thread
#257502 16/04/16 01:35 AM
D
DevilBeach
DevilBeach
D
I am creating a twitch bot for my friend, I have the "on text" function working properly but the following code doesn't execute when a new user joins the chat

On !*:Join:#:{
msg $nick Hey There $nick ! Welcome To $chan !
}

This is the first time I've used this language so I'm not 100% familiar with the syntax. Any tips and help would be greatly appreciated!

#257504 16/04/16 09:34 AM
N
Netct25
Netct25
N
Hi Devil,

Try using this script. Compare both and you will see the difference in my syntax and yours. If you have any questions feel free to ask me. smile Hope this fixes your issue. Just a couple of run downs of what each identifier does. # means channel, $nick the username who activated the command or in your case triggered it. In yours you had msg $nick in this case, $nick cannot be messaged, $nick can only be messaged through chat which is why we do $chan which also means channel. So msg $chan means write this message in this channel.

Fixed:
on !*:JOIN:#: {
msg $chan Hey there $nick $+ ! Welcome to $remove(#,$chr(35))) $+ !
}

Yours:
On !*:Join:#:{
msg $nick Hey There $nick ! Welcome To $chan !
}

Last edited by Netct25; 16/04/16 09:38 AM.
#257517 17/04/16 11:18 PM
D
DevilBeach
DevilBeach
D
I copy and pasted your exact code and it's still not working at all.

#257519 18/04/16 12:38 AM
J
JB_uk
JB_uk
J
Have you executed the updated CAP requests for twitch?

Code:
    /raw CAP REQ :twitch.tv/membership
    /raw CAP REQ :twitch.tv/commands 


I have these in a script so when I connect, they automatically execute

Code:
ON *:CONNECT: {
  if ($server == tmi.twitch.tv) {
    /raw CAP REQ :twitch.tv/membership
    /raw CAP REQ :twitch.tv/commands
  }
}

Let me know if this helps.


Link Copied to Clipboard