fix vscode launch scripts
BiRabittoh andronacomarco@gmail.com
Tue, 09 Jan 2024 11:29:24 +0100
3 files changed,
8 insertions(+),
8 deletions(-)
M
.vscode/launch.json
→
.vscode/launch.json
@@ -20,7 +20,7 @@ "outFiles": ["${workspaceFolder}/build/**/*.js"]
}, { "name": "Deploy commands", - "program": "${workspaceFolder}/build/tools/deploy-commands.js", + "program": "${workspaceFolder}/tools/deploy-commands.js", "request": "launch", "skipFiles": [ "<node_internals>/**"@@ -29,7 +29,7 @@ "type": "node"
}, { "name": "Delete commands", - "program": "${workspaceFolder}/build/tools/delete-commands.js", + "program": "${workspaceFolder}/tools/delete-commands.js", "request": "launch", "skipFiles": [ "<node_internals>/**"
M
README.md
→
README.md
@@ -17,16 +17,16 @@ ```
While that happens, create your own application in the [Discord Developer Portal](https://discord.com/developers/applications). In the "Bot" tab, click on "Add Bot", then generate a new token. Now you can copy `config.example.json` into `config.json` and fill it with your Application ID and Discord Bot Token. +Build the project: +``` +npm run build +``` + Then, deploy your commands: ``` npm run deploy-commands ``` This will also give you a link to invite the bot to any server. - -Build the project: -``` -npm run build -``` Finally, type this to start the bot: ```
M
tools/deploy-commands.js
→
tools/deploy-commands.js
@@ -9,7 +9,7 @@ if (!(applicationId && token))
throw 'Check your config.json!'; const commands = new Array(); -const commandsPath = path.join(process.cwd(), 'commands'); +const commandsPath = path.join(process.cwd(), 'build', 'commands'); const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js')); for (const file of commandFiles) {