Specific response to specific user

I want to make a command that gives a specific response when quoting a specific user, with this command I can make it always answer the same if I throw it myself, but I want a specific response if someone else throws the command and quotes me,
is this possible?

$(eval $(user).toLowerCase()==Nanoxs.toLowerCase()?cuidado romeo $(touser) :$(user).toLowerCase()==nanokprueba.toLowerCase()?A ti si que te ama $(touser) :$(eval const responses = ['A ti si que te ama','Ella no te ama','Ella no te ama','Ella no te ama', 'Ella no te ama', 'Ella no te ama', 'Ella no te ama', 'Ella no te ama', 'Ella no te ama', 'Ella no te ama', 'Ella no te ama', 'Ella no te ama']; responses[Math.floor(Math.random() * responses.length)];) $(touser))

sorry my bad english

Hey @nano_riuzaki!

I’m not quite sure of what you want, but here’s what I understood:

$(eval a=`YOUR_USERNAME`.toLowerCase(); `$(user)`.toLowerCase()==a?`RESPONSE_WHEN_YOU_CALL_THE_COMMAND`:`$(touser)`.toLowerCase()==a?`RESPONSE_WHEN_SOMEONE_MENTIONS_YOU`:`DEFAULT_RESPONSE`;)

thanks for your time, I tried it and “RESPONSE_WHEN_SOMEONE_MENTIONS_YOU” it is not working
when someone mentions me its show DEFAULT_RESPONSE

if I throw the command myself the user takes it as “Nanoxs”, but if someone throws the command to me it takes it as “@Nanoxs”, then in the second part the == a is not fulfilled. how do I solve it? help me please

My bad, I totally forgot people mention with the @, because we really don’t need to use it.
I fixed the command so it works when people use the @ to mention people, YOUR_USERNAME should be written without the @.

$(eval a=`YOUR_USERNAME`.toLowerCase(); `$(user)`.toLowerCase().replace(`@`,``)==a?`RESPONSE_WHEN_YOU_CALL_THE_COMMAND`:`$(touser)`.toLowerCase().replace(`@`,``)==a?`RESPONSE_WHEN_SOMEONE_MENTIONS_YOU`:`DEFAULT_RESPONSE`;)

really excellent, now yes, it’s perfect

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