So im trying to learn the $(eval) and i made a test command by it gives me this error “Right-hand side of ‘instanceof’ is not an object”
$(eval ‘$(user)’.toLowerCase() === {‘firejemz’, “hiyazcool”} ? “Here is the best support you could have asked for!” : “Your not Zaemazz (firejemz)”)
Please help
*note I am also trying to make a multi user command
This is one way to achieve what you need.
Declare a string variable u which has an assigned value of the username converted to lower case.
u = `$(user)`.toLowerCase();
Set up 2 “equal to” comparison operators, one comparing u to “firejemz”
u == `firejemz`
and the other comparing u to “hiyazcool”
u == `hiyazcool`
Set up an OR logical operator using the 2 comparison operators.
u == `firejemz` || u == `hiyazcool`
Set up a ternary operator using the OR operator.
u == `firejemz` || u == `hiyazcool` ? `Response if OR condition is satisfied.` : `Response if OR condition is NOT satisfied.`
The command response below has unnecessary whitespaces removed.
$(eval u=`$(user)`.toLowerCase();u==`firejemz`||u==`hiyazcool`?`Here is the best support you could have asked for!`:`You're not Zaemazz (firejemz)`)
Thank you so much <3 I’ve been dumbfounded for 3 days trying to do this
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.