> For the complete documentation index, see [llms.txt](https://odkm.gitbook.io/s4dguide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://odkm.gitbook.io/s4dguide/master.md).

# S4D Guide

First you need to install discord.js 13v by doing this in shell!

```
npm i discord.js@latest
```

{% hint style="info" %}
If in package.json file you already have  got `discord.js  13v` then ignore above.
{% endhint %}

## Installing NodeJS 16v on Replit

Discord.JS v13 requires NodeJS v16 or newer

On replit got to shell tab to execute the command.

{% hint style="danger" %}
Not in Console.
{% endhint %}

```
npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH
```

After you are done with this,

Execute this to clean npm cache and reinstall the package in the shell

```
rm -rf node_modules && rm package-lock.json && npm cache clear --force && npm cache clean --force && npm i
```

* [ ] Now on replit make a new file named - .replit
* [ ] To execute node from the shell instead of the console.
* [ ] Put this in the .replit file

```
run="npm start"
```

Make sure to add the start script and other scripts in your package.json file

```
"scripts": {
 "start": "node .",
  "node-update": "npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH",
  "node-clean": "rm -rf node_modules && rm package-lock.json && npm cache clear --force && npm cache clean --force && npm i"
}
```

![My main file is index.js your can be different mostly- bot.js or server.js](/files/-Mhx2O6nGpwGJBI3zxQ9)

This is how a normal (without extra packages should look).

After Completing these steps,

You need to export your code and copy everything the premade code too and put in your main file.

To start your bot you need to enter this this in shell and press enter.

```
node .
```

After this your bot will start!

Have Fun making commands!!

For help 👇

{% hint style="success" %}
Ask in help and support channel s4d Community Server
{% endhint %}
