diff --git a/base/JaBa.js b/base/JaBa.js index b0275044..66cdf5e4 100644 --- a/base/JaBa.js +++ b/base/JaBa.js @@ -46,16 +46,14 @@ class JaBa extends Client { this.discordTogether = new DiscordTogether(this); - playdl.getFreeClientID().then(clientID => { - playdl.setToken({ - soundcloud: { - client_id: clientID - } - }); - }); - this.player = new Player(this); + playdl.getFreeClientID().then(id => playdl.setToken({ + soundcloud: { + client_id: id + } + })); + this.player.on("trackStart", async (queue, track) => { const m = await queue.metadata.channel.send({ content: this.translate("music/play:NOW_PLAYING", { songName: track.title }, queue.metadata.channel.guild.data.language) }); if (track.durationMS > 1) { diff --git a/package-lock.json b/package-lock.json index 564e3c06..0c60c1ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "cron": "^2.1.0", "discord-api-types": "^0.37.5", "discord-giveaways": "^6.0.1", - "discord-player-play-dl": "^5.3.7", + "discord-player-play-dl": "^5.3.8", "discord.js": "^14.3.0", "ejs": "^3.1.3", "express": "^4.17.1", @@ -32,9 +32,7 @@ "md5": "^2.2.1", "moment": "^2.26.0", "mongoose": "^5.13.15", - "ms": "^2.1.3", - "play-dl": "^1.9.5", - "tiny-typed-emitter": "^2.1.0" + "ms": "^2.1.3" }, "devDependencies": { "eslint": "^8.23.0" @@ -1480,14 +1478,13 @@ } }, "node_modules/discord-player-play-dl": { - "version": "5.3.7", - "resolved": "https://registry.npmjs.org/discord-player-play-dl/-/discord-player-play-dl-5.3.7.tgz", - "integrity": "sha512-lj4QfiewbbU3jxhCfPcHdbOVYFcIiykBYYUxu/7okqp825igcU5Biv4NE8i+HV3XLxRyy6DDfyTQDJdbe61u3w==", + "version": "5.3.8", + "resolved": "https://registry.npmjs.org/discord-player-play-dl/-/discord-player-play-dl-5.3.8.tgz", + "integrity": "sha512-b6FksqGgExsmGNkbkgwLeug8rZbx0mR9QJmkgRbztoKuJNu21h/XZLx4cmuMLZVXpTbm0Hchi4nmOuIr+b67gA==", "dependencies": { "@discordjs/voice": "^0.11.0", "libsodium-wrappers": "^0.7.10", - "play-dl": "^1.9.5", - "play-dl2": "^1.9.6", + "play-dl": "^1.9.6", "spotify-url-info": "^3.1.2", "tiny-typed-emitter": "^2.1.0", "tslib": "^2.4.0" @@ -3653,20 +3650,9 @@ "integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==" }, "node_modules/play-dl": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.5.tgz", - "integrity": "sha512-tfjBgpU6AD63snK6sXiSuAOi+3iLsqVvsFcvCritOetF/zIo2OcB4BURX+WaQLUmEX3sUJhzP/vqG8SSl7WEpA==", - "dependencies": { - "play-audio": "^0.5.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/play-dl2": { "version": "1.9.6", - "resolved": "https://registry.npmjs.org/play-dl2/-/play-dl2-1.9.6.tgz", - "integrity": "sha512-CLx1K5+rIeGFO15OyDD05Uncc7EipLrO2JhbW4+IvopEQUb1z+Cg9ojSp7aVzQUhq/ZHlEnB6G1a+G0gBxT3HQ==", + "resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.6.tgz", + "integrity": "sha512-JW44bQbME9fNfGhGXQ/rdcsHr4BfgJabVlSgpS9QY/NscfprFH1asv+q9atrZThP3+hHIpgtFNABccg9rFWlwg==", "dependencies": { "play-audio": "^0.5.2" }, @@ -5849,14 +5835,13 @@ } }, "discord-player-play-dl": { - "version": "5.3.7", - "resolved": "https://registry.npmjs.org/discord-player-play-dl/-/discord-player-play-dl-5.3.7.tgz", - "integrity": "sha512-lj4QfiewbbU3jxhCfPcHdbOVYFcIiykBYYUxu/7okqp825igcU5Biv4NE8i+HV3XLxRyy6DDfyTQDJdbe61u3w==", + "version": "5.3.8", + "resolved": "https://registry.npmjs.org/discord-player-play-dl/-/discord-player-play-dl-5.3.8.tgz", + "integrity": "sha512-b6FksqGgExsmGNkbkgwLeug8rZbx0mR9QJmkgRbztoKuJNu21h/XZLx4cmuMLZVXpTbm0Hchi4nmOuIr+b67gA==", "requires": { "@discordjs/voice": "^0.11.0", "libsodium-wrappers": "^0.7.10", - "play-dl": "^1.9.5", - "play-dl2": "^1.9.6", + "play-dl": "^1.9.6", "spotify-url-info": "^3.1.2", "tiny-typed-emitter": "^2.1.0", "tslib": "^2.4.0" @@ -7469,17 +7454,9 @@ "integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==" }, "play-dl": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.5.tgz", - "integrity": "sha512-tfjBgpU6AD63snK6sXiSuAOi+3iLsqVvsFcvCritOetF/zIo2OcB4BURX+WaQLUmEX3sUJhzP/vqG8SSl7WEpA==", - "requires": { - "play-audio": "^0.5.2" - } - }, - "play-dl2": { "version": "1.9.6", - "resolved": "https://registry.npmjs.org/play-dl2/-/play-dl2-1.9.6.tgz", - "integrity": "sha512-CLx1K5+rIeGFO15OyDD05Uncc7EipLrO2JhbW4+IvopEQUb1z+Cg9ojSp7aVzQUhq/ZHlEnB6G1a+G0gBxT3HQ==", + "resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.6.tgz", + "integrity": "sha512-JW44bQbME9fNfGhGXQ/rdcsHr4BfgJabVlSgpS9QY/NscfprFH1asv+q9atrZThP3+hHIpgtFNABccg9rFWlwg==", "requires": { "play-audio": "^0.5.2" } diff --git a/package.json b/package.json index f48d5549..d336509c 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "cron": "^2.1.0", "discord-api-types": "^0.37.5", "discord-giveaways": "^6.0.1", - "discord-player-play-dl": "^5.3.7", + "discord-player-play-dl": "^5.3.8", "discord.js": "^14.3.0", "ejs": "^3.1.3", "express": "^4.17.1", @@ -35,9 +35,7 @@ "md5": "^2.2.1", "moment": "^2.26.0", "mongoose": "^5.13.15", - "ms": "^2.1.3", - "play-dl": "^1.9.5", - "tiny-typed-emitter": "^2.1.0" + "ms": "^2.1.3" }, "devDependencies": { "eslint": "^8.23.0"