If follower after certain time

hi, i was coding for a friend and was hoping for some help. I want to make a command that only 6 month+ followers can use. i coded this but it did not work. please help. thanks!

if(follow < 15778463){
You have not followed long enough to use this command
}
else(){
$(user) has said to spam GG in the chat!
}

Hey @bazookaben!

In your command you want to get the amount of months the user has been following the channel first. Which you can do with the following API:

https://api.2g.be/twitch/followage/$(channel)/$(touser)?format=months

So your command would look like this:

$(eval var m=`$(urlfetch https://api.2g.be/twitch/followage/$(channel)/$(user)?format=months)`.split(` `); m=m[m.length-2]; if(m<6||isNaN(m)){`You have not followed long enough to use this command.`}else{`$(user) has said to spam GG in the chat!`})

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