mIRC Home    About    Download    Register    News    Help

Print Thread
On Join not working #257502 16/04/16 01:35 AM
Joined: Apr 2016
Posts: 5
D
DevilBeach Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2016
Posts: 5
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!

Re: On Join not working [Re: DevilBeach] #257504 16/04/16 09:34 AM
Joined: Dec 2015
Posts: 36
N
Netct25 Offline
Ameglian cow
Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
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.
Re: On Join not working [Re: Netct25] #257517 17/04/16 11:18 PM
Joined: Apr 2016
Posts: 5
D
DevilBeach Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2016
Posts: 5
I copy and pasted your exact code and it's still not working at all.

Re: On Join not working [Re: DevilBeach] #257519 18/04/16 12:38 AM
Joined: Oct 2014
Posts: 49
JB_uk Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2014
Posts: 49
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.