mIRC Home    About    Download    Register    News    Help

Print Thread
L
Lakyluke98
Lakyluke98
L
I've build a twitch bot which worked perfectly fine. Since a few days i cannot execute my commands for mods and the admin. I've written the script again and also downloaded mirc again but it's still not working. As an example i have this code:

on *:TEXT:!admincommand:#: {
if ($nick !isaop #) { msg $chan $nick you are not a mod or admin
return }
msg $chan You are a mod or admin

I get " you are not a mod or admin".

Could someone help me? smirk

Joined: Dec 2013
Posts: 771
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 771
Originally Posted By: Help Files
isaop if v1 is a user in your auto-op list for channel v2 (v2 optional)
change it to !isop

Joined: Apr 2010
Posts: 964
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 964
Code:
alias isTwitchMod {
  return $iif($msgtags(user-type).key == mod || $mid(#, 2-) == $nick, $true)
}


on *:TEXT:!admincommand:#: {
  if ($isTwitchMod) {
    msg $chan $nick you are not a mod or admin 
  }
  else {
    msg $chan You are a mod or admin
  }
}

L
Lakyluke98
Lakyluke98
L
Thanks alot! smile


Link Copied to Clipboard