How to execute a .bat file with a command (with a cooldown by user if possible) on the twitch chat

The values that are wrapped in < > in the example are for you to replace with what your username/OAuth token is.

The reason you are getting a not defined error with your username is because it’s a string, you need to put it in single or double quotes, eg 'lyricalstring_lightsbot' or "lyricalstring_lightsbot". Same for the OAuth token used as the password, it’s a string so has to be in quotes, or a variable that you’ve already defined.

If you are inexperienced with Javascript/NodeJS I recommend either connecting to chat using a library in a language you’re more familiar with, or reading through some introduction to NodeJS guides to understand the basics.