Looking to make a specific command

I’m looking to make a command that picks a random name from a set of names, and then lists how many times that particular name has been given from the command.

Example Command: !blame
Example Output: Name3 has been blamed, for the 7th time!

What I have right now.

!addcom !blame $(eval a=[`Name1`,`Name2`,`Name3`,`Name4`,`Name5`,`Name6`];a[Math.floor(Math.random()*a.length)])

The above works to pick someone at random, but I’m unsure how to append the counter to it, hope I’m making sense.

Thanks in advance!

Hey @Navarian!

I’m sorry, but a counter $(count) only counts the number of use of the command, and can’t be used to count how many times a variable/name has been used.

Ah okay, appreciate the response.

Any chance there would be another way to reach my end results within nightbot?

Thanks.

Yes, create your own API and have Nightbot call it.

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