Individual Counter Command

I want to create a command that counts every time a specific viewer uses a command. I know that the $(count) function counts every time the command is used but I want it to be person specific. I have looked through here and know that it can be done but I cant seem to get it to work for me. I have looked into API and can’t sort it out!

Generate your tokens here
https://twitch.center/customapi/quote/generate
They come between token= and &data
The public token is 8 digits that private token is 16 digits
Then put them in the respective places in the command.

Command:

$(eval C=`$(urlfetch json https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN&no_id=1)`.split(`,`);A=`$(urlfetch https://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=$(user),)`;x=0;for(i=0;i<C.length-1;i++){if(C[i]==`$(user)`){x++}};`$(user) has used this command ${x+1} times.`)

Add it though the nightbot dashboard so no one gets ur private token

This should work for your purposes.

2 Likes

Thank you so much! I should say that I meant I want it to count how many times they have used a different command. But I think I know how to do it! I would just use an alias I believe… So basically one command for !hug and one command to count how many times the specific viewer has used !hug. Am I right that I can just use the alias and it will for this out? I really appreciate your help!!

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