Anyone that is using the PIRCBOT API (http://www.jibble.org/pircbot.php), for any Bot you may have created (as i do for the project at code.google.com/p/twitch-bot-krashnburnz/), you can do the following to fix the issue:

You can Override the method in the PIRCBOT API onConnect as follows

@Override
protected void onConnect() {
	this.sendRawLine("CAP REQ :twitch.tv/membership");
}

This will request membership directly after the bot connects, before joining any channels and allow you to still receive JOIN, PART, and most importantly NAMES

1 Like

For mIRC users/bots, mIRC’s next public release will support IRCv3 message tags. There is no ETA but the closed beta just got support for them though the implementation does not split/parse the tags for you. The tags are simply removed from messages and stored in $msgtags for use in scripted events.

You are still required to send the respective CAP REQ messages BEFORE joining any channels/streams:

on *:LOGON:*:{
  if (!$regex($server, /^(tmi|irc)\.twitch\.tv$/i)) { return }
  raw CAP REQ :twitch.tv/membership
  raw CAP REQ :twitch.tv/tags
  raw CAP REQ :twitch.tv/commands
}

;; Example usage:
on *:TEXT:!amSub:#:{
  var %isSubscriber = $iif(subscriber=0 isin $msgtags, yes, no)
  msg # $nick are you subbed: %isSubscriber
}
1 Like

I use the latest version of Mirc and have two questions hopefully someone can assist with.

  1. It seems that every single time my bot connects to my Twitch channel I need to type the command /RAW CAP REQ :twitch.tv/membership to get the join/part to work. Anyway to have it automatically work the moment it connects to IRC and then my twitch channel? i.e. Can I script it somehow, and if so, What exact script command would this be

  2. This one is more annoying to me. I have a few commands that my bot controls e.g. my Raffle system that are MOD ONLY e.g. “is op” scripts that I added. When I try to run those commands I get a message that I set for non mods saying “L0rd_Exodia this command is for moderators only.” How exactly can I fix that with this new system.

Help on this is VERY appreciated, but please look at your response and make sure it doesn’t cause more confusion or raise more unnecessary questions. If your going to recommend a script, please take the 2 minutes to actually type the script out. Not everyone is on your level & this thread is much longer than it needs to be already. A simple 1 post guide would have solved this long ago. I wish I knew more scripting because I would have been the guy to do the guide.

Thanks again.

Go to Setting > connect > Options > Perform and add raw CAP REQ :twitch.tv/membership
i’m not sure if it does the command before you join the channels tho.

1 Like

You can set it as a perform action for the server in the option as stated above.

If you want to implement it into your script you’d need to use what SReject wrote above your script.

on *:LOGON:*:{  
  raw CAP REQ :twitch.tv/membership
  raw CAP REQ :twitch.tv/commands
}

This will trigger before it joins a channel in any case. membership is required for JOIN/PART messages that also include OP status. I happen to need to use the commands capability to get the NOTICE messages from the server since they switched from JTV to those.

‘raw CAP REQ :twitch.tv/tags’ would not be advisable for you I suppose since it would turn everything into raw messages and you would need to rewrite your script completely for it to utilize them.

1 Like

Thanks MattiSony & ColdBlood3d, both methods worked fine for the first question regarding having to enter the command each time I connect. I appreciate the help there.

Anyone have any idea about my bot not seeing me or anyone as a moderator to execute Moderator Required commands. A small amount of my Scripts are written with the If user Is OP.

With all those commands me or any of my mods get an error, “you need to be a moderator to use this command” I wrote the script with that message, but for some reason after the change made by twitch with their IRC server no one’s moderator or owner status is being recognized.

First of all check if you or your moderators exist in bots nicklist. If not - that means you join channel before you request /membership.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.