I've been scratching my head on this one for a while. JS isn't my first language (heh) and I don't know how to make it work. I feel like it can work... just not if I do it alone.
The goal is to make a command that dynamically works based on input, unless one user uses it. That user should be met with a different response.
Command would be !command 11 (where 11 can be any number, but if no number is provided, it will default to 5)
What I have now:
$(eval `$(user)`.toLowerCase()==`baduser`.toLowerCase()?`Hey, $(user) --> you can't do that.`:` Here is your guess worth $(eval if("$(1)">1){"$(1)"}else{"5"}) points --> `$(urlfetch https://api.url?points=$(eval if("$(1)">1){"$(1)"}else{"5"})))
The first two parts work as expected (selective user and 'guess worth X points' but then in the URLfetch the expected number is not being included. My assumption is that I shouldn't have 3 separate 'eval' calls here, and instead there's probably a more syntactically correct way to do it, I just don't know.
Any help is greatly appreciated.