play-dl больше не нужен, устанавливается discord-player

This commit is contained in:
Jonny_Bro (Nikita) 2023-03-28 14:53:45 +05:00
parent 60a7a4f949
commit bd6edcd309
4 changed files with 8 additions and 13 deletions

View file

@ -9,7 +9,6 @@ const BaseEvent = require("./BaseEvent.js"),
path = require("path"), path = require("path"),
fs = require("fs").promises, fs = require("fs").promises,
mongoose = require("mongoose"), mongoose = require("mongoose"),
playdl = require("play-dl"),
moment = require("moment"); moment = require("moment");
moment.relativeTimeThreshold("ss", 5); moment.relativeTimeThreshold("ss", 5);
@ -45,12 +44,6 @@ class JaBa extends Client {
this.player = Player.singleton(this); this.player = Player.singleton(this);
playdl.getFreeClientID().then(id => playdl.setToken({
soundcloud: {
client_id: id,
},
}));
this.player.events.on("playerStart", async (queue, track) => { this.player.events.on("playerStart", 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) }); 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) if (track.durationMS > 1)

11
package-lock.json generated
View file

@ -32,8 +32,7 @@
"md5": "^2.2.1", "md5": "^2.2.1",
"moment": "^2.26.0", "moment": "^2.26.0",
"mongoose": "^5.13.15", "mongoose": "^5.13.15",
"ms": "^2.1.3", "ms": "^2.1.3"
"play-dl": "^1.9.6"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.23.0" "eslint": "^8.23.0"
@ -3476,12 +3475,14 @@
"node_modules/play-audio": { "node_modules/play-audio": {
"version": "0.5.2", "version": "0.5.2",
"resolved": "https://registry.npmjs.org/play-audio/-/play-audio-0.5.2.tgz", "resolved": "https://registry.npmjs.org/play-audio/-/play-audio-0.5.2.tgz",
"integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==" "integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==",
"peer": true
}, },
"node_modules/play-dl": { "node_modules/play-dl": {
"version": "1.9.6", "version": "1.9.6",
"resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.6.tgz", "resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.6.tgz",
"integrity": "sha512-JW44bQbME9fNfGhGXQ/rdcsHr4BfgJabVlSgpS9QY/NscfprFH1asv+q9atrZThP3+hHIpgtFNABccg9rFWlwg==", "integrity": "sha512-JW44bQbME9fNfGhGXQ/rdcsHr4BfgJabVlSgpS9QY/NscfprFH1asv+q9atrZThP3+hHIpgtFNABccg9rFWlwg==",
"peer": true,
"dependencies": { "dependencies": {
"play-audio": "^0.5.2" "play-audio": "^0.5.2"
}, },
@ -7024,12 +7025,14 @@
"play-audio": { "play-audio": {
"version": "0.5.2", "version": "0.5.2",
"resolved": "https://registry.npmjs.org/play-audio/-/play-audio-0.5.2.tgz", "resolved": "https://registry.npmjs.org/play-audio/-/play-audio-0.5.2.tgz",
"integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==" "integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==",
"peer": true
}, },
"play-dl": { "play-dl": {
"version": "1.9.6", "version": "1.9.6",
"resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.6.tgz", "resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.6.tgz",
"integrity": "sha512-JW44bQbME9fNfGhGXQ/rdcsHr4BfgJabVlSgpS9QY/NscfprFH1asv+q9atrZThP3+hHIpgtFNABccg9rFWlwg==", "integrity": "sha512-JW44bQbME9fNfGhGXQ/rdcsHr4BfgJabVlSgpS9QY/NscfprFH1asv+q9atrZThP3+hHIpgtFNABccg9rFWlwg==",
"peer": true,
"requires": { "requires": {
"play-audio": "^0.5.2" "play-audio": "^0.5.2"
} }

View file

@ -35,8 +35,7 @@
"md5": "^2.2.1", "md5": "^2.2.1",
"moment": "^2.26.0", "moment": "^2.26.0",
"mongoose": "^5.13.15", "mongoose": "^5.13.15",
"ms": "^2.1.3", "ms": "^2.1.3"
"play-dl": "^1.9.6"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.23.0" "eslint": "^8.23.0"