I need help with the Execution

**Im new to Glitch.com and I dont know how to execute a program. I don’t know if its wrong or something like that but I need help. Here is the program: ** https://pastebin.com/uZnq9Huf

Hi, if you have a package.json file (which I’m assuming you do), add this to it:

"scripts": {
  "start": "node your-bot-file-here.js"
}

then click show and choose one of the options, and it will run. Alternatively, in the terminal (tools > terminal) run node your-bot-file-here.js.
Please note that your project will go to sleep after 5 minutes of inactivity.

1 Like

You can also remix a discord bot starter and paste in your code.

Im kinda new to coding and im still learing it. i don’t understand what you mean by node your bot file here.

Ok, so node.js is setver side javascript - that’s what your bot is written in. In a command line or terminal, you can run a command beginning with node to do something with node.js. To run a node.js file, you can run node filename, replacing filename with the name of the file that you want to run. So let’s say the file you’ve got your bot code in is called bot.js, you’d run node bot.js to run that file.

1 Like

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