User Specific Counting

I am currently trying to add a command that counts a user every time they are tapped. I tried using " !tap $(eval a={“User1”:"$(count)",“User2”:"$(count)",“User3”:"$(count)"};a[decodeURIComponent($(touser))]||Who?)" But with this, it would count for all users at the same time, messing up the counter. It also forces me to add each person manually, which I don’t mind, but would prefer if it would be so that anyone could tap anyone. I hope this makes sense, and is possible.

A: !tap B

Nightbot: A tapped B for a total of 2 times

B: !tap A
Nightbot: B tapped A for a total of 5 times

Hey @merklederp!

$(count) is for the entire command, and Nightbot variables are replaced before the code executes, therefore you can’t have user-specific counters inside the same command, sorry.

Well this is technically possible with the use of the [CustomAPI] Quote system it would be pretty complicated and convoluted for a simple command.

1 Like

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