Hello, relatively new user here. I have a very basic understanding of JavaScript, as I took a class for it in high school. I apologize if my jargon isnt very up to code.
I’ve been using NightBot recently, and I was wondering if it was possible to carry over a variable after it’s been defined within the command line?
For example, I have this code
$(eval const responses=[‘response 1’, ‘Response 2’, ‘Response 3’, ‘Response 4’]; responses[Math.floor(Math.random() * responses.length)]
And it works to randomly select one of the responses and output it into chat.
The end message being “Don’t forget to check out (response) on Twitch!”
Is there a way I could take (response), and make it output in the same command, so I could have it output fully as:
“Don’t forget to check out (response) on Twitch”