Cheer system through mIRC

Seeing as i can capture the Bits posted to a channel through @raw, I was wondering if i could use this to display a message in chat when someone donates Bits.

I’ve edited the code to capture and greet resubs with the new system, to possible put a response in chat with Cheers.

raw USERNOTICE:*:{
if ($msgtags(room-id).key == ROOM ID) {
if ($2- == $null) && (bits isin $msgtags) {
describe $1 $msgtags(display-name).key donated $msgtags(bits).key Bits SeemsGood
}
else {
describe $1 $msgtags(display-name).key donated $msgtags(bits).key Bits SeemsGood with the message " $2- " MVGame
}
}
}

However im probably doing it wrong as this will not give the required response in chat.

I was wondering if someone could help me out with this.

Thanks in advance!

Try this:

on $*:text:/(^|\s)cheer\d+(\s|$)/i:#: {
  if (($msgtags(room-id).key == ROOM ID) && ($msgtags(bits).key)) {
    if ($2- == $null) {
      describe $1 $msgtags(display-name).key donated $msgtags(bits).key Bits SeemsGood
    }
    else {
      describe $1 $msgtags(display-name).key donated $msgtags(bits).key Bits SeemsGood with the message " $2- " MVGame
    }
  }
}

(Untested)

Thanks for the reply. I will try this as soon as possible.

Problem being is that i dont have a creditcard and thus cant buy Bits.
I have to wait now until a friend is in chat so he can donate 1 bit :stuck_out_tongue:

It did not work. Someone posted cheer1000 and the bot did not gave a message in chat.

This will only work if they actually donate bits. Just typing “cheer10000” will not trigger it. If it WAS an actual bits donation, check to make sure the ROOM ID is correct.

Edit: I tested the code myself, and it works as expected.

Room ID is correct and the person Actually donated Bits.

Also make sure you are requesting CAPabilities somewhere in your scripts:

ON *:CONNECT: {
  raw CAP REQ :twitch.tv/membership twitch.tv/tags twitch.tv/commands
}

I have, Otherwise i couldn’t see the actual Bits message in @raw.

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

I see the issue. I made a mistake in the code, sorry. Forgot to switch $1 with $chan when I posted. This will trigger on all bits donations:

on $*:text:/(^|\s)cheer\d+(\s|$)/i:#: {
  if (($msgtags(room-id).key == ROOM ID) && ($msgtags(bits).key)) {
    describe $chan $msgtags(display-name).key donated $msgtags(bits).key Bits SeemsGood
  }
}

Apologies for the wrong info.

Thanks. I thought it was something small :stuck_out_tongue:

I’ll inform you as soon as someone Cheers :slight_smile:

Unfortunately, No succes.

<- @badges=subscriber/1,bits/100;bits=1;color=#0000FF;display-name=ImDippinIn;emotes=;id=799fcaf5-d134-44fb-9d3f-6068f70bfb23;mod=0;room-id=31640426;subscriber=1;turbo=0;user-id=67889083;user-type= :imdippinin!imdippinin@imdippinin.tmi.twitch.tv PRIVMSG #aethos19d :cheer1

And the code in mIRC is:

on $*:text:/(^|\s)cheer\d+(\s|$)/i:#: {
  if (($msgtags(room-id).key == 31640426) && ($msgtags(bits).key)) {
    if ($2- == $null) {
      describe $chan $msgtags(display-name).key donated $msgtags(bits).key Bits SeemsGood
    }
    else {
      describe $chan $msgtags(display-name).key donated $msgtags(bits).key Bits SeemsGood with the message " $2- " MVGame
    }
  }
}

Wait … The $2 is nowhere specified. You think i should take that out completely?

EDIT: After using your post listed below, There still is no message displayed in chat.

on $*:text:/(^|\s)cheer\d+(\s|$)/i:#: {
  if (($msgtags(room-id).key == ROOM ID) && ($msgtags(bits).key)) {
    describe $chan $msgtags(display-name).key donated $msgtags(bits).key Bits SeemsGood
  }
}

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