Hi everyone,

I'm looking to set up a Twitch bot that thanks users for subbing, resubbing and gifting subs. However, I'm having issues with the gifting subs part.

Originally, I had the script setup but if a user gifted 10 subs (for example) then it would post a message 10 times when I would only want it to post a message once. Anyone know how I can get around this? This is what I have so far:

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


raw USERNOTICE:*:{
if (($msgtags(msg-id).key == sub) && ($1 == #TwitchUsername)) {
var %ck $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
MSG $1 @ $+ %ck Welcome to the Fam!!
}
elseif (($msgtags(msg-id).key == resub) && ($1 == #TwitchUsername)) {
var %ck $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
if ($0 == 1) {
MSG $1 Thank you @ $+ %ck for the resubbing for $msgtags(msg-param-cumulative-months).key months!!
}
}
elseif (($msgtags(msg-id).key == subgift) && ($1 == #TwitchUsername)) {
var %ck $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
if ($0 == 1) {
MSG $1 Thank you @ $+ %ck for the gifting subs!
}
else {
MSG $1 Thank you @ $+ %ck for the gifting subs!
}
}

}


Thank you in advanced!