- Node.js - A Node.js version greater or equal to 16.9.0.
- TypeScript
-
Use
npm i
command to install all packages. -
Go to config.json file and fill the strings with their bot data.
{
"token": "their bot token here",
"prefix": "!",
"slash": {
"testing": false,
"serverTest": "their personal server ID here",
"botID": "their bot ID here"
}
}
- Run the project with
npm run start
command.
- The property
slash.testing
in config.json file is used to specify if you want to deploy your slash commands only on one server or all servers:
true
: It deploys only on the server that you specified in slash.serverTest
property.
false
: It deploys on all servers.
-
I'm using a json file for this example to save the bot data, but if you want could can use Environment Variables, just replace variables in the code.
-
I set the intents number to
3276799
in Client.ts file for have no problem, but you can modify this number with the intents that you need. For this, use the Discord Intents Calculator website.