To detect new subscriptions:
on *:text:*just subscribed*:#:{
if ($nick == twitchnotify) && ($4 != to) {
Insert rest of code here
}
}
To detect resubs:
raw USERNOTICE:*:{
if (resub isin $msgtags) {
Insert Code Here
}
}
Use the $msgtags(display-name).key for username and $msgtags(msg-param-months).key for amount of months subbed.
You need to also need to raw CAP REQ :twitch.tv/tags on connect