Hello i have this problem with my bot that when someone resubs it can call the ammount of months and i cant seem to find the problem here is the code i am using any one that has any idea what is going on
i am using the TMI Framework
client.on(“resub”, (channel, username, _months, message, userstate, metod) =>{
console.log(“resub”, {channel, username, metod, message, userstate});
let streakmonths = userstate[“msg-parm-streak-months”];
let cumulativemonths = userstate[“msg-parm-cumulative-months”];
let sharedstreak = userstate[“msg-parm-should-shared-streak”];
if(sharedstreak){
client.say(channel, Thanks for Resubscribing for ${streakmonths} consective months, ${username}!
);
}
else{
client.say(channel, Thanks for Resubscribing for ${cumulativemonths} months, ${username}!
);
}
});
Thank you in advance