all repos — simple-discord-music-bot @ 11618de1e7166cedd87a510b2bab1d52ff1c5744

A Discord bot making use of discord.js and play-yt.

fix vscode launch scripts
BiRabittoh andronacomarco@gmail.com
Tue, 09 Jan 2024 11:29:24 +0100
commit

11618de1e7166cedd87a510b2bab1d52ff1c5744

parent

3cd4260914ed6ce22946a50edf86abdfc03763ec

3 files changed, 8 insertions(+), 8 deletions(-)

jump to
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.mdREADME.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.jstools/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) {