How to make a wordcount "headshot" command and show the counter

Hello! i was trying to make a command that can track how many times a word has been said. I know about this command:

!addcom -cd=5 Headshot $(eval temp=$(count); )

But that command only counts secretly and i need to show that number, so how can i show the Count number in other command? Maybe !headshot Mikey has $(query) headshots ?
Anythings helps!

Hey @mikeylizarraga!

You simply use $(count) in the middle of the sentence:

!addcom !headshot -ul=mod Mikey has $(count) headshots!

I advise reading the documentation.

1 Like

Well I know $(count) could work, but that only works when command is called, correct? I mean the $(count) command increased by one only when this is called, I want to secretly count the headshot word and then use a command to show the secretly counter, is that possible?

Ah, your first request wasn’t clear.
But to answer your question, no, you could have a !addheadshot command to update !headshot so the value of $(count) isn’t shown when !addheadshot is called, but Nightbot would still respond saying that !headshot was updated, see this topic:

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