I'm trying to make a command that runs something like this:
!command (without option) -> asks if option1 or option2
!command option1 -> outputs sentence1
!command option2 -> runs $(eval Math.floor(Math.random() * X) == 0 ? "sentence2" : "Sentence 3"
So if the random number is 0 it does sentence2 if its any other number it does sentence 3
I've gotten all the code to work indepedently but I can't seem to get the format right when I combine everything together.
I have it set up like this. I'm not exactly sure what I'm doing wrong.
$(eval a=$(query).toLowerCase();a.includes('option1') ? 'sentence1';a.includes('option2') ? $(eval Math.floor(Math.random() * X) == 0 ? "sentence 2" : "sentence 3"; 'option1 or option2')
X is a number that put in.