mIRC Home    About    Download    Register    News    Help

Print Thread
[Twitch] Re-Sub Help #258410 02/07/16 02:11 AM
Joined: Jul 2016
Posts: 6
I
ItsWZRDx Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Jul 2016
Posts: 6
I was using this for Resubs Notifications and it stopped working with the new update, any help?

Here is the code:

on 1:connect: { raw CAP REQ :twitch.tv/membership }

on 1:text:*subscribed*:#CHANNELID:{
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
elseif ($nick == twitchnotify) && ( $4 == $null ) { describe $chan Welcome to the # $1! }
elseif ($nick == twitchnotify) && ( $4 isnum ) { describe $chan $1 has subscribed for $4 months in a row! }
}

Re: [Twitch] Re-Sub Help [Re: ItsWZRDx] #258412 02/07/16 03:14 AM
Joined: Jun 2014
Posts: 77
K
Khonor Offline
Babel fish
Offline
Babel fish
K
Joined: Jun 2014
Posts: 77
Hey @ItsWZRDx,


Try using this code:

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

on 1:TEXT:*subscribed*:#[CHANNEL NAME HERE]:{
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
elseif ($nick == twitchnotify) && ( $4 == $null ) { describe $chan Welcome to the # $1 $+ ! }
}


raw USERNOTICE:*:{
if (($msgtags(msg-id).key == resub) && ($1 == #[CHANNEL NAME HERE])) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
if ($0 == 1) {
describe $1 %nick has been subbed for $msgtags(msg-param-months).key months in a row!
}
else {
describe $1 %nick has been subbed for $msgtags(msg-param-months).key months in a row with the message: $qt($2-)
}
}
}

Re: [Twitch] Re-Sub Help [Re: Khonor] #258413 02/07/16 03:43 AM
Joined: Jul 2016
Posts: 6
I
ItsWZRDx Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Jul 2016
Posts: 6
Thank you @Khonor

I am going to try that in the stream for tonight and I will report back if I have any issues.

Re: [Twitch] Re-Sub Help [Re: ItsWZRDx] #258414 02/07/16 04:21 AM
Joined: Jul 2016
Posts: 6
I
ItsWZRDx Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Jul 2016
Posts: 6
I used this code and it didn't work for the resubs, let me know if I did anything wrong. [It did work for the new subs though]

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

on 1:TEXT:*subscribed*:#[nickmercs]:{
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
elseif ($nick == twitchnotify) && ( $4 == $null ) { describe $chan nickmercsSH Welcome to the #MercsFam $1 nickmercsLOVE nickmercsLY $+ ! }
}


raw USERNOTICE:*:{
if (($msgtags(msg-id).key == resub) && ($1 == #[nickmercs])) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
if ($0 == 1) {
describe $1 nickmercsSH %nick has been subbed for $msgtags(msg-param-months).key months in a row! nickmercsLOVE nickmercsLY
}
else {
describe $1 nickmercsSH %nick has been subbed for $msgtags(msg-param-months).key months in a row with the message: $qt($2-) nickmercsLOVE nickmercsLY
}
}
}

Last edited by ItsWZRDx; 02/07/16 04:22 AM.
Re: [Twitch] Re-Sub Help [Re: ItsWZRDx] #258415 02/07/16 04:26 AM
Joined: Jun 2014
Posts: 77
K
Khonor Offline
Babel fish
Offline
Babel fish
K
Joined: Jun 2014
Posts: 77
Remember in the "#ChannelName" is not going this "[ ]" or the bot will not respond you.

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

on 1:TEXT:*subscribed*:#nickmercs:{
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
elseif ($nick == twitchnotify) && ( $4 == $null ) { describe $chan nickmercsSH Welcome to the #MercsFam $1 nickmercsLOVE nickmercsLY $+ ! }
}


raw USERNOTICE:*:{
if (($msgtags(msg-id).key == resub) && ($1 == #nickmercs)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
if ($0 == 1) {
describe $1 nickmercsSH %nick has been subbed for $msgtags(msg-param-months).key months in a row! nickmercsLOVE nickmercsLY
}
else {
describe $1 nickmercsSH %nick has been subbed for $msgtags(msg-param-months).key months in a row with the message: $qt($2-) nickmercsLOVE nickmercsLY
}
}
}

Re: [Twitch] Re-Sub Help [Re: Khonor] #258416 02/07/16 04:36 AM
Joined: Jul 2016
Posts: 6
I
ItsWZRDx Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Jul 2016
Posts: 6
It works, thanks for all the help! <3

Re: [Twitch] Re-Sub Help [Re: ItsWZRDx] #258417 02/07/16 04:40 AM
Joined: Jun 2014
Posts: 77
K
Khonor Offline
Babel fish
Offline
Babel fish
K
Joined: Jun 2014
Posts: 77
You're welcome @ItsWZRDx a pleasure to help you! smile

Re: [Twitch] Re-Sub Help [Re: Khonor] #258529 22/07/16 06:12 PM
Joined: Feb 2015
Posts: 12
S
Scootycoolguy Offline
Pikka bird
Offline
Pikka bird
S
Joined: Feb 2015
Posts: 12
I am having problems with the 2nd part of the re-sub notification code not working when a user types a message. It works on new subs and re-subs without a message, but doesn't work once they add that message.