Since I have the pause command at the end of the code it should stop there if I get an error, but it is closing before it gets there for some reason. Instead of giving me the error it had been before the window just instantly closes. Again this works in the cmd when I navigated to the folder and typed it manually, but when I try to do it in the batch file it does not work. "C:\Program Files\nodejs\node.exe" bot.js The node command was in my path so I'm not sure why it wasn't working, but in another post, someone recommended that instead of typing just node to type the full file path, so I tried this and it worked. This is all the code for that batch file: off 'node' is not recognized as an internal or external command, operable program or batch file. ![]() Originally I was just using the node command and when I opened cmd, navigated to the folder, and typed it manually it worked fine, but when I put that same code into a batch file it gave me this error: All of the code that I have written for the bot works except for the batch file that is supposed to run it. I am in the process of making a discord bot.
0 Comments
Leave a Reply. |