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!
Word Counter For Chat
4 replies
@Silky Tiger 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 "jack".
Regards
Hey @Silky Tiger!
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 @Maple Goose said, you can't count words that aren't the first one of a message.