NightDev Community Forums

Custom command specific user response

I am trying to make a command that gives a different response to a specific person, for example: The bald command!
People who put it on will get a random number, but I want a friend of mine to always come out 100% bald

Can someone help me?

Hey @gonze!

This topic has been addressed a couple times already, please use the search bar before opening a new one.

Here’s the solution:

!addcom !commandName $(eval `$(user)`.toLowerCase()==`SPECIFIC_USER`.toLowerCase()?`SPECIFIC_USER_RESPONSE`:`GENERAL_RESPONSE`)

Replace the SPECIFIC_USER, SPECIFIC_USER_RESPONSE, and GENERAL_RESPONSE fields without removing the backticks (`).

Thank you so much for help me

but I don’t really understand what I have to do so that the specific user always gets 100%

Replace SPECIFIC_USER by the username for which you want the response to always be 100%, SPECIFIC_USER_RESPONSE by 100%, and GENERAL_RESPONSE by your current command message content.

but then to that I put the name of the same command?

Yes, that said, if you want to edit an already existing command use !editcom and not !addcom.

What I want to do is that I have a command called !bald, it tells you a random percentage but I want a person to always get 100%

Yes, do you expect me to give you the full command? Because from my first reply you just need to replace content, it can’t be easier than this… Look, I do it in 30 seconds, just copy/paste this in your chat:

!editcom !bald $(eval `$(user)`.toLowerCase()==`gonze`.toLowerCase()?`You're 100% bald!`:`You're ${Math.floor(Math.random()*101)}% bald!`)