How do I check the value of a variable?

I wanna make a command that works like this:

🎱 $(eval const responses = ['All signs point to yes...', 'Yes!', 'My sources say nope.', 'You may rely on it.', 'Concentrate and ask again...', 'Outlook not so good...', 'It is decidedly so!', 'Better not tell you.', 'Very doubtful.', 'Yes - Definitely!', 'It is certain!', 'Most likely.', 'Ask again later.', 'No!', 'Outlook good.', 'Don\'t count on it.']; responses[Math.floor(Math.random() * responses.length)];)

But in the sense that if the query is a specific message (I don’t needa tell you about it to just help with the coding), then just reply β€œNo!”. How would I embed the query into the JavaScript?

Replace MSG with the message to detect.

🎱 $(eval const responses=['All signs point to yes...', 'Yes!', 'My sources say nope.', 'You may rely on it.', 'Concentrate and ask again...', 'Outlook not so good...', 'It is decidedly so!', 'Better not tell you.', 'Very doubtful.', 'Yes - Definitely!', 'It is certain!', 'Most likely.', 'Ask again later.', 'No!', 'Outlook good.', 'Don\'t count on it.'];decodeURIComponent(`$(querystring)`)==`MSG`?`No!`:responses[Math.floor(Math.random()*responses.length)])

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