alias followcheck {
var %follow $1
var %username $iif($left($2,1) == $chr(35),$right($2,-1),$2)
var %url $+(https://api.twitch.tv/kraken/users/,%follow,/follows/channels/,%username)
jsonclearcache
var %error $json(%url,error)
if $isid { return %error }
if !%error {
echo -tag %follow is follower of %username
}
else {
echo -tag %follow is not follower of %username
}
}
on *:text:!gimme:#: {
var %error $followcheck($nick,$chan)
if %error { msg $chan $nick , you are not a follower. Hit that follow button to have access to this command! }
else { msg $chan Here is your gold. }
}