Hello! I was trying to make a command that can track how many times a word has been said. Such as “jack” which is my name, and then everytime that get’s said in a sentence or chat, it adds to a counter that I can do like !jack and have a count for the number of times it’s been chatted. Anything helps!
@crispyjack No real way of doing this. As a command Nightbot only sees the first argument.
!addcom -cd=5 jack $(eval temp=$(count); ` `)
This will secretly count the command. And later you can check how many times the command is being called. Note the counter only increase if someone types the first word as “
I’m assuming that the word you want counted goes inside the ’ '?
No, here the
` ` is for the counter to count silently, otherwise it’ll just send numbers in your chat every time someone says your name as the first word of their message,
jack—as the command—is what is counted, and as @Ritik_Ranjan said, you can’t count words that aren’t the first one of a message.
I figured that out the hard way lol. I ended up doing an Alias and called on a command that says the number everytime. But thanks for the help! Still helped me with understanding Nightbot better!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.