Why isn't this command working?

Hi all,

I found this on this forum, however, I cannot get it working.
It’s probably me being stupid, but I would really appreciate some help.

!addcom !pick $(eval const responses = [‘player1’, ‘player2’, ‘player3’]; responses[Math.floor(Math.random() * responses.length)]:wink:

My understanding is that if I post !addcom !pick in my Twitch Channel chat, Nightbot should say either Player 1, Player 2, or Player 3… but what I actually get is “There was an error adding the command. Error: Path message is required.”

I have attached a picture of the custom command section - hopefully you can see what I am doing wrong

Commands with spaces in the name don’t actually work, and !addcom is a default command for adding custom commands, so not only does the command not work if you type ‘!addcom !pick’, Nightbot thinks you want to add another command !pick, for which you haven’t specified a command response and hence returns a message error.

You should set the name from !addcom pick to just !pick, and for future reference don’t use spaces in command names or use names of default commands.

2 Likes

Thank you very much my friend!
That would perfectly now.

I really appreciate the help :slight_smile:

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