Check if certain user is using the command?

Hi. I’m trying to make a !rate command that rates users out of 10. But I want it to give a rating of 0 every time a specific user I know uses the command. I tried this:

Nightbot gives you a rating of $(eval var a = “$(user)”; if(a == “Username”){0}else{ Math.floor((Math.random() * 10) + 1)})

But it still returns Invalid or Unexpected Token. Is there something I’m doing wrong? Please let me know

This should work fine.

Nightbot gives you a rating of $(eval `$(user)`==`USER`?0:Math.ceil(Math.random()*10))

It worked, thanks for your help.

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