mIRC Homepage
Posted By: Lakyluke98 Bot is not detecting op status - 11/11/15 06:37 PM
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
Posted By: Nillen Re: Bot is not detecting op status - 11/11/15 10:51 PM
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
Posted By: FroggieDaFrog Re: Bot is not detecting op status - 11/11/15 10:58 PM
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
  }
}
Posted By: Lakyluke98 Re: Bot is not detecting op status - 30/11/15 04:30 PM
Thanks alot! smile
© mIRC Discussion Forums