Eval command does not work


#1

Why does my command just show the code a text and not actually using it? Can somebody give me a fix?

!commands add !timelook -cd=5 $(eval var a = “$(query)”; if (a === “”) { (“Please type a time zone after the command”); } else { (“The time is: $(time $(query) “h:mm:ss”)”; })


#2

That command doesn’t work because you are missing a right parentheses after ("The time is: $(time $(query) "h:mm:ss")"

Here is a working version of your command (your parentheses aren’t necessary):

!commands add !timelook -cd=5 $(eval var a = `$(query)`; if (a === "") { "Please type a time zone after the command" } else { "The time is: $(time $(query) "h:mm:ss")" })

#3

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